From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) by sourceware.org (Postfix) with ESMTP id 684603854E5F for ; Mon, 5 Jun 2023 09:23:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 684603854E5F Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=kernel.crashing.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=kernel.crashing.org Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id 3559MU0f010725; Mon, 5 Jun 2023 04:22:30 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 3559MTW0010720; Mon, 5 Jun 2023 04:22:29 -0500 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Mon, 5 Jun 2023 04:22:28 -0500 From: Segher Boessenkool To: P Jeevitha Cc: gcc-patches@gcc.gnu.org, bergner@linux.ibm.com Subject: Re: [PATCH] rs6000: Remove duplicate expression [PR106907] Message-ID: <20230605092227.GP19790@gate.crashing.org> References: <5a8be692-5779-1b9a-e387-073da84fbebe@linux.vnet.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5a8be692-5779-1b9a-e387-073da84fbebe@linux.vnet.ibm.com> User-Agent: Mutt/1.4.2.3i X-Spam-Status: No, score=-8.8 required=5.0 tests=BAYES_00,GIT_PATCH_0,JMQ_SPF_NEUTRAL,KAM_DMARC_STATUS,SPF_HELO_PASS,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hi! On Mon, Jun 05, 2023 at 12:11:42PM +0530, P Jeevitha wrote: > PR106907 has few warnings spotted from cppcheck. In that addressing duplicate > expression issue here. Here the same expression is used twice in logical > AND(&&) operation which result in same result so removing that. > > 2023-06-05 Jeevitha Palanisamy > > gcc/ > PR target/106907 > * config/rs6000/rs6000.cc (vec_const_128bit_to_bytes): Remove > duplicate expression. > > > diff --git a/gcc/config/rs6000/rs6000.cc b/gcc/config/rs6000/rs6000.cc > index 42f49e4a56b..d197c3f3289 100644 > --- a/gcc/config/rs6000/rs6000.cc > +++ b/gcc/config/rs6000/rs6000.cc > @@ -28784,7 +28784,6 @@ vec_const_128bit_to_bytes (rtx op, > > info->all_words_same > = (info->words[0] == info->words[1] > - && info->words[0] == info->words[1] > && info->words[0] == info->words[2] > && info->words[0] == info->words[3]); Thanks! Okay for trunk. Also okay for all backports, no need to wait if unexpected problems in trunk show up. But still, backport to 13 first, then 12, then 11, only stop when it stops applying (or there are no open release branches left) :-) Segher