From patchwork Fri Mar 28 12:14:30 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Krebbel X-Patchwork-Id: 334678 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 6FE06140084 for ; Fri, 28 Mar 2014 23:14:47 +1100 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type; q=dns; s= default; b=lAYresDf/YABiSxCOIw3Z1e1ufGw3Z8fX6lqrmSEdfD9Z2+78HOrQ ApOYtBOpqRBIJtHMV4k2hQfWFh3WDwo9biVVW2hJ1lWNnWipqGkKO/Rwl7jSbQT3 AjaLUk9OFfAPGjoA5ZwJGloJs7ppeXUB5CxjlWZztOX/FgxB5p7h68= 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:date :from:to:subject:message-id:mime-version:content-type; s= default; bh=r6rxe8PIJM+kXEviyLnkVlxg2fo=; b=MDriqi6bHm6TS+18cU4N 25fshHz5HS8Ga3dnB51pxyP8cH0faMF902AQ+2hJUq+cvRhEPMtSdk1425EReEex 5kjmZHet9z0ick1PRhyi87uszpVcIMw3aiEunLzv5zDEYZ6TIJwZmeXForE2BxZU eBFkay2vARcwKILwLy69/no= Received: (qmail 29801 invoked by alias); 28 Mar 2014 12:14:40 -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 29789 invoked by uid 89); 28 Mar 2014 12:14:39 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: e06smtp12.uk.ibm.com Received: from e06smtp12.uk.ibm.com (HELO e06smtp12.uk.ibm.com) (195.75.94.108) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Fri, 28 Mar 2014 12:14:38 +0000 Received: from /spool/local by e06smtp12.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 28 Mar 2014 12:14:34 -0000 Received: from d06dlp02.portsmouth.uk.ibm.com (9.149.20.14) by e06smtp12.uk.ibm.com (192.168.101.142) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 28 Mar 2014 12:14:33 -0000 Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by d06dlp02.portsmouth.uk.ibm.com (Postfix) with ESMTP id E97C22190041 for ; Fri, 28 Mar 2014 12:14:26 +0000 (GMT) Received: from d06av09.portsmouth.uk.ibm.com (d06av09.portsmouth.uk.ibm.com [9.149.37.250]) by b06cxnps3074.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id s2SCEKQZ55836924 for ; Fri, 28 Mar 2014 12:14:20 GMT Received: from d06av09.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av09.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s2SCEWnB003629 for ; Fri, 28 Mar 2014 06:14:32 -0600 Received: from bart (dyn-9-152-212-28.boeblingen.de.ibm.com [9.152.212.28]) by d06av09.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with SMTP id s2SCEVBg003546 for ; Fri, 28 Mar 2014 06:14:31 -0600 Received: by bart (sSMTP sendmail emulation); Fri, 28 Mar 2014 13:14:30 +0100 Date: Fri, 28 Mar 2014 13:14:30 +0100 From: Andreas Krebbel To: gcc-patches@gcc.gnu.org Subject: [PATCH] S/390: Make S/390 a logical_op_short_circuit target Message-ID: <20140328121430.GA31529@bart> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 14032812-8372-0000-0000-00000922DD8D X-IsSubscribed: yes Hi, S/390 does not not define LOGICAL_OP_NON_SHORT_CIRCUIT but its default value depends on the branch cost. On S/390 we set a branch cost of 1 which makes us a logical_op_short_circuit target. This "fixes" the following testcases: < FAIL: gcc.dg/binop-xor1.c scan-tree-dump-times optimized "\\\\^" 1 < FAIL: gcc.dg/tree-ssa/forwprop-28.c scan-tree-dump-times forwprop1 "Replaced" 8 < FAIL: gcc.dg/tree-ssa/vrp87.c scan-tree-dump vrp2 "Folded into: if.*" < FAIL: gcc.dg/tree-ssa/vrp87.c scan-tree-dump cddce2 "Deleting.*_Bool.*;" Bye, -Andreas- 2014-03-28 Andreas Krebbel * gcc.dg/tree-ssa/ssa-dom-thread-4.c: Remove s390 special option. * lib/target-supports.exp: Return true for s390 in check_effective_logical_op_short_circuit. diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-4.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-4.c index 1e46634..cafdf13 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-4.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-4.c @@ -1,6 +1,5 @@ /* { dg-do compile } */ /* { dg-options "-O2 -fdump-tree-dom1-details" } */ -/* { dg-additional-options "-mbranch-cost=2" { target s390*-*-* } } */ struct bitmap_head_def; typedef struct bitmap_head_def *bitmap; typedef const struct bitmap_head_def *const_bitmap; diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index bee8471..0d2ccd5 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -5712,6 +5712,7 @@ proc check_effective_target_logical_op_short_circuit {} { || [istarget arc*-*-*] || [istarget avr*-*-*] || [istarget crisv32-*-*] || [istarget cris-*-*] + || [istarget s390*-*-*] || [check_effective_target_arm_cortex_m] } { return 1 }