From patchwork Thu Feb 23 11:04:52 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Toma Tabacu X-Patchwork-Id: 731481 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3vTWbn0SCxz9s7n for ; Thu, 23 Feb 2017 22:05:06 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="DraSvm/n"; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:content-type :content-transfer-encoding:mime-version; q=dns; s=default; b=Amv 6/R+1uPJNsNafvswD5LSc3v1pmYLohcJLPmlW1Y1WdAg2PKA/D+BBOlAdFrzTFu1 XolEBol35poURA1SGvhFzB5h+/sib6o21jtNqzNTqfSFNvcBCYz8x5ZT36ToOe/1 mJRzGZ3pQEHT0onw4jVXUpT4QaVxBgAR7QfDrJAI= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:content-type :content-transfer-encoding:mime-version; s=default; bh=9wYueZmhx pbo0NX3KPLvdd2OkCU=; b=DraSvm/ngdg0DWGrjcDUFmU9TQ2JOIcT1pOVE/nyr PaYmWyuNjdEjqv8lajshnM/0eMq4eyaTZvoqG2BL8qRZ1koy+t6PLLHN9L7ejYyg qUkTdmlQ8Ef+w3Fbzka1AqpAWlJCcDKdvEpn10JfIHLlhxExpy8p7WA0wNcK8IuI XI= Received: (qmail 55823 invoked by alias); 23 Feb 2017 11:04:57 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 55795 invoked by uid 89); 23 Feb 2017 11:04:56 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.5 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 spammy=H*Ad:U*ppalka X-Spam-User: qpsmtpd, 2 recipients X-HELO: mailapp01.imgtec.com Received: from mailapp01.imgtec.com (HELO mailapp01.imgtec.com) (195.59.15.196) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 23 Feb 2017 11:04:55 +0000 Received: from HHMAIL01.hh.imgtec.org (unknown [10.100.10.19]) by Forcepoint Email with ESMTPS id 290027C261CE3; Thu, 23 Feb 2017 11:04:50 +0000 (GMT) Received: from hhmail02.hh.imgtec.org ([fe80::5400:d33e:81a4:f775]) by HHMAIL01.hh.imgtec.org ([fe80::710b:f219:72bc:e0b3%26]) with mapi id 14.03.0294.000; Thu, 23 Feb 2017 11:04:52 +0000 From: Toma Tabacu To: "gcc-patches@gcc.gnu.org" CC: "rguenther@suse.de" , "ppalka@gcc.gnu.org" , Matthew Fortune Subject: [PATCH, testsuite] Use logical_op_short_circuit to skip targets in ssa-thread-14.c. Date: Thu, 23 Feb 2017 11:04:52 +0000 Message-ID: MIME-Version: 1.0 X-IsSubscribed: yes Hi, The ssa-thread-14.c test has been failing for MIPS for a while. According to Patrick Palka, who modified this test's target selector in the fix for PR71314, this test fails on targets which don't use non-short-circuit logical ops and should be skipped for such targets. In the case of MIPS, LOGICAL_OP_NON_SHORT_CIRCUIT is set to 0, so the test should be skipped for MIPS targets. This patch adds the !logical_op_short_circuit requirement (defined in testsuite/lib/target-supports.exp:7965) to ssa-thread-14.c's dg-options, which will exclude MIPS targets. It also removes the "-mbranch-cost" options from being passed to targets which will be skipped because of the newly added !logical_op_short_circuit requirement. This makes ssa-thread-14.c's target selector more similar the one from ssa-thread-11.c (which was mentioned as a solution to PR71314 in the Bugzilla thread). Here are some links, for your convenience: PR71314 on Bugzilla: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71314 The patch submission for fixing PR71314: https://gcc.gnu.org/ml/gcc-patches/2016-05/msg02359.html Does this look OK ? Is the !logical_op_short_circuit too heavy-handed here ? Regards, Toma Tabacu gcc/testsuite/ * gcc.dg/tree-ssa/ssa-thread-14.c (dg-options): Use logical_op_short_circuit to skip targets. (dg-additional-options): Don't pass -mbranch-cost=2 for MIPS, AVR and s390. diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-thread-14.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-thread-14.c index c754b5b..aa1323a 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/ssa-thread-14.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-thread-14.c @@ -1,6 +1,6 @@ -/* { dg-do compile { target { ! { m68k*-*-* mmix*-*-* mep*-*-* bfin*-*-* v850*-*-* moxie*-*-* cris*-*-* m32c*-*-* fr30*-*-* mcore*-*-* powerpc*-*-* xtensa*-*-* hppa*-*-* nios2*-*-* } } } } */ +/* { dg-do compile { target { ! { logical_op_short_circuit || { m68k*-*-* mmix*-*-* mep*-*-* bfin*-*-* v850*-*-* moxie*-*-* cris*-*-* m32c*-*-* fr30*-*-* mcore*-*-* powerpc*-*-* xtensa*-*-* hppa*-*-* nios2*-*-* } } } } } */ /* { dg-additional-options "-O2 -fdump-tree-vrp-details" } */ -/* { dg-additional-options "-mbranch-cost=2" { target mips*-*-* avr-*-* s390*-*-* i?86-*-* x86_64-*-* } } */ +/* { dg-additional-options "-mbranch-cost=2" { target i?86-*-* x86_64-*-* } } */ /* { dg-final { scan-tree-dump-times "Threaded jump" 8 "vrp1" } } */ void foo (void);