From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13074 invoked by alias); 3 Apr 2015 00:03:01 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 13065 invoked by uid 89); 3 Apr 2015 00:03:00 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-ig0-f181.google.com Received: from mail-ig0-f181.google.com (HELO mail-ig0-f181.google.com) (209.85.213.181) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Fri, 03 Apr 2015 00:02:59 +0000 Received: by igbqf9 with SMTP id qf9so86069257igb.1 for ; Thu, 02 Apr 2015 17:02:57 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.42.24.195 with SMTP id x3mr452906icb.81.1428019377226; Thu, 02 Apr 2015 17:02:57 -0700 (PDT) Received: by 10.36.43.131 with HTTP; Thu, 2 Apr 2015 17:02:57 -0700 (PDT) In-Reply-To: <20150402234142.GA31174@ibm-tiger.the-meissners.org> References: <20150402052235.GU26234@bubble.grove.modra.org> <20150402234142.GA31174@ibm-tiger.the-meissners.org> Date: Fri, 03 Apr 2015 00:03:00 -0000 Message-ID: Subject: Re: [RS6000] Fix 65576 regression From: David Edelsohn To: Michael Meissner , GCC Patches , Michael Meissner , Alan Modra Content-Type: text/plain; charset=ISO-8859-1 X-SW-Source: 2015-04/txt/msg00099.txt.bz2 On Thu, Apr 2, 2015 at 7:41 PM, Michael Meissner wrote: > On Thu, Apr 02, 2015 at 03:52:35PM +1030, Alan Modra wrote: >> This cures an unrecognizable insn ICE by modifying a predicate of >> extenddftf2_internal (the only place this predicate is used) to ensure >> that rtl optimization passes do not substitute 0.0 for a register with >> known 0.0 value, except when VSX is enabled. ie. Don't undo the >> necessary register move emitted by the extenddftf2_fprs expander. >> Bootstrapped and regression tested powerpc64le-linux, powerpc64-linux >> and powerpc-linux. OK to apply? >> >> PR target/65576 >> PR target/65240 >> * config/rs6000/predicates.md (zero_reg_mem_operand): Exclude >> 0.0 constant unless TARGET_VSX. >> >> Index: gcc/config/rs6000/predicates.md >> =================================================================== >> --- gcc/config/rs6000/predicates.md (revision 221805) >> +++ gcc/config/rs6000/predicates.md (working copy) >> @@ -964,7 +964,8 @@ >> >> ;; Return 1 if the operand is CONST_DOUBLE 0, register or memory operand. >> (define_predicate "zero_reg_mem_operand" >> - (ior (match_operand 0 "zero_fp_constant") >> + (ior (and (match_test "TARGET_VSX") >> + (match_operand 0 "zero_fp_constant")) >> (match_operand 0 "reg_or_mem_operand"))) >> >> ;; Return 1 if the operand is a CONST_INT and it is the element for 64-bit >> > > I definately prefer Alan's patch over mine. > > In looking at extenddftf2_internal, I believe you are correct David, in that > final alternative will never match because 0.0 will not be valid (pre-VSX 0.0 > won't be allowed as operand2, VSX 0.0 will not match "n" constraint). For the > VSX case, the "n" should be either "j" or "E". > > If you are doing a double->long double conversion, and it happens to pick GPRs > for some reason, the GPR side will do a load/move of 0.0 instead of using li to > load 0 on pre-VSX systems. If the final alternative cannot occur, it should be removed as well. Alan, would you please test that change also? Thanks, David