From patchwork Thu Mar 29 19:29:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aaron Sawdey X-Patchwork-Id: 892929 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-475627-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.vnet.ibm.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="mbAl7KAU"; dkim-atps=neutral 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 40BvwH5fQxz9s19 for ; Fri, 30 Mar 2018 06:30:07 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :subject:from:to:cc:date:content-type:mime-version:message-id; q=dns; s=default; b=xRv/wUG1aunk9N5Lt+mcxABVG9v9sjk1/W3LRDYM8R4 9ITEDyHx6uILGKF8nnxkCq/evWVvg95D7Dv4/lvpE+uPVicGU2cQXwjGXKM5tEM2 ZRLbzwLwC4ePb2ihIWWfS3AkpCaLRogddYvEmzPWvRjN43+qpJcck0Im6GFUcEKg = 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 :subject:from:to:cc:date:content-type:mime-version:message-id; s=default; bh=5e8QckP1TYJbqukWBeX+8fOgkJ4=; b=mbAl7KAUmDZKBzQWd E3KXzIARtT17mRF/4vM/4cuQPYZEWXIrcpQXtAKtnmsZOrLk9xoodgXMh/i4Ny5Z 1+s1NMcmWwPNzaysOfH2K6q/UkeVWJZX4oVYTj0N1U5c7OR/6A/SeSnXZSL104qQ 7UR0GNTzm3v/LnM7UV7bY8N4NI= Received: (qmail 103683 invoked by alias); 29 Mar 2018 19:30:00 -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 102500 invoked by uid 89); 29 Mar 2018 19:29:59 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-10.2 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, KAM_ASCII_DIVIDERS, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 spammy=Aaron X-HELO: mx0a-001b2d01.pphosted.com Received: from mx0b-001b2d01.pphosted.com (HELO mx0a-001b2d01.pphosted.com) (148.163.158.5) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 29 Mar 2018 19:29:58 +0000 Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w2TJT6Hm023205 for ; Thu, 29 Mar 2018 15:29:57 -0400 Received: from e34.co.us.ibm.com (e34.co.us.ibm.com [32.97.110.152]) by mx0a-001b2d01.pphosted.com with ESMTP id 2h1437pcy7-1 (version=TLSv1.2 cipher=AES256-SHA256 bits=256 verify=NOT) for ; Thu, 29 Mar 2018 15:29:56 -0400 Received: from localhost by e34.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 29 Mar 2018 13:29:55 -0600 Received: from b03cxnp07028.gho.boulder.ibm.com (9.17.130.15) by e34.co.us.ibm.com (192.168.1.134) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 29 Mar 2018 13:29:54 -0600 Received: from b03ledav003.gho.boulder.ibm.com (b03ledav003.gho.boulder.ibm.com [9.17.130.234]) by b03cxnp07028.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w2TJTrVv14418318; Thu, 29 Mar 2018 12:29:53 -0700 Received: from b03ledav003.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A90A86A03C; Thu, 29 Mar 2018 13:29:53 -0600 (MDT) Received: from ragesh3a.rchland.ibm.com (unknown [9.10.86.66]) by b03ledav003.gho.boulder.ibm.com (Postfix) with ESMTP id 70AE76A03B; Thu, 29 Mar 2018 13:29:53 -0600 (MDT) Subject: [PATCH, rs6000] PR target/83822 fix redundant conditions From: Aaron Sawdey To: GCC Patches Cc: Segher Boessenkool , Bill Schmidt , dcb314@hotmail.com Date: Thu, 29 Mar 2018 14:29:53 -0500 Mime-Version: 1.0 X-TM-AS-GCONF: 00 x-cbid: 18032919-0016-0000-0000-00000876CB35 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00008766; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000255; SDB=6.01010238; UDB=6.00514701; IPR=6.00789516; MB=3.00020316; MTD=3.00000008; XFM=3.00000015; UTC=2018-03-29 19:29:55 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18032919-0017-0000-0000-00003E0AF0FA Message-Id: <1522351793.7066.3.camel@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2018-03-29_11:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1803290202 X-IsSubscribed: yes I've fixed the redundant conditions in the expressions pointed out by 83822. Bootstrap/regtest passes on ppc64le, ok for trunk? Aaron 2018-03-29 Aaron Sawdey PR target/83822 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant condition. * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant condition. Index: gcc/config/rs6000/rs6000-c.c =================================================================== --- gcc/config/rs6000/rs6000-c.c (revision 258900) +++ gcc/config/rs6000/rs6000-c.c (working copy) @@ -642,8 +642,7 @@ cpp_get_callbacks (pfile)->macro_to_expand = rs6000_macro_to_expand; } } - if (!TARGET_HARD_FLOAT - || (TARGET_HARD_FLOAT && !TARGET_DOUBLE_FLOAT)) + if (!TARGET_HARD_FLOAT || !TARGET_DOUBLE_FLOAT) builtin_define ("_SOFT_DOUBLE"); /* Used by lwarx/stwcx. errata work-around. */ if (rs6000_cpu == PROCESSOR_PPC405) Index: gcc/config/rs6000/rs6000-string.c =================================================================== --- gcc/config/rs6000/rs6000-string.c (revision 258900) +++ gcc/config/rs6000/rs6000-string.c (working copy) @@ -966,8 +966,7 @@ rtx final_cleanup = gen_label_rtx (); rtx cmp_rem_before = gen_reg_rtx (word_mode); /* Compare one more word_mode chunk if needed. */ - if (!bytes_is_const - || (bytes_is_const && bytes_remaining >= load_mode_size)) + if (!bytes_is_const || bytes_remaining >= load_mode_size) { /* If remainder length < word length, branch to final cleanup compare. */