From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9918 invoked by alias); 14 Jul 2014 17:57:45 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 9780 invoked by uid 48); 14 Jul 2014 17:57:39 -0000 From: "pthaugen at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/61757] [4.10 Regression] genmodes failure with enable-checking Date: Mon, 14 Jul 2014 17:57:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 4.10.0 X-Bugzilla-Keywords: build X-Bugzilla-Severity: normal X-Bugzilla-Who: pthaugen at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.10.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-07/txt/msg00906.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61757 --- Comment #29 from Pat Haugen --- (In reply to Segher Boessenkool from comment #21) > (In reply to Pat Haugen from comment #19) > > So in the case where MIN_INT32 is passed (sign extended), the upper 32 bits > > are '1' so r212352 returns a value of 63 whereas prior revisions returned a > > value of 31. > > When called with r3=ffffffff80000000 the new code > returns -1 as far as I can see? The new code is doing a logical shift right of the full 64-bit reg, which will require 63 shifts for the value in the reg to become zero. > And it should be called with 0000000080000000 instead; > does the caller not have a prototype in scope? No, there is no prototype, which is really the problem because it should be passed zero-extended as you say in which case either of the code sequences would work. I tried the benchmark after the patch went in, and it is back to generating the rldicl insn and the benchmark passes.