Summary: | [3.4 Regression] amd64 fails -fpeephole2 | ||
---|---|---|---|
Product: | gcc | Reporter: | Doug Coleman <erg> |
Component: | target | Assignee: | Uroš Bizjak <ubizjak> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | gcc-bugs, pinskia |
Priority: | P2 | Keywords: | ice-on-valid-code, patch |
Version: | 4.0.2 | ||
Target Milestone: | 3.4.5 | ||
URL: | http://gcc.gnu.org/ml/gcc-patches/2005-10/msg00945.html | ||
Host: | Target: | x86_64-*-linux-gnu | |
Build: | Known to work: | 3.2.3 4.1.0 4.0.3 3.4.5 | |
Known to fail: | 3.3.5 4.0.2 | Last reconfirmed: | 2005-10-17 07:21:18 |
Bug Depends on: | 24330 | ||
Bug Blocks: | |||
Attachments: | scheme48 bignum modified for use with Factor |
Description
Doug Coleman
2005-10-11 18:57:55 UTC
Created attachment 9968 [details]
scheme48 bignum modified for use with Factor
Oh, can you show the command line invokation of gcc? gcc -fpeephole2 s48_bignum.i Thanks! (In reply to comment #2) > Oh, can you show the command line invokation of gcc? Never mind, -O0 -fpeephole2 makes it fail. Reduced testcase for 4.0.x and above: void s48_double_to_bignum(int exponent){ long length = ((((exponent) + ((((sizeof (long)) * 8) - 2) - 1)) / (((sizeof (long)) * 8) - 2))); } This really should be filed in a different PR as that one is a regression. I will try to get a reduced testcase for 3.4.x and 3.3.x later today. Here is the one for 3.3.3 and above: typedef long bignum_digit_type; void bignum_divide_unsigned_normalized( ){ bignum_digit_type guess; guess = ((((unsigned long) 1) << (((sizeof (bignum_digit_type)) * 8) - 2)) - 1); } I will file the other one seperate now. (In reply to comment #5) > Reduced testcase for 4.0.x and above: Filed as PR 24330. Confirmed that this is a real regression. The instruction we are should have split earlier: (insn/v 8 21 26 (set (mem/c/i:DI (plus:DI (reg/f:DI 6 bp) (const_int -8 [0xfffffffffffffff8])) [0 guess+0 S8 A64]) (const_int 4611686018427387903 [0x3fffffffffffffff])) 81 {*movdi_1_rex64} (nil) (nil)) *** Bug 24330 has been marked as a duplicate of this bug. *** It turned out the one in comment #5 is the same issue as the orginal bug too. Subject: Bug 24315 CVSROOT: /cvs/gcc Module name: gcc Changes by: uros@gcc.gnu.org 2005-10-17 07:09:25 Modified files: gcc : ChangeLog gcc/testsuite : ChangeLog gcc/config/i386: i386.md Added files: gcc/testsuite/gcc.target/i386: pr24315.c Log message: PR target/24315 * config/i386/i386.md (*pushdi2_rex64 splitter) (*movdi_1_rex64 splitter, *ashldi3_1 splitter) (*ashrdi3_1 splitter, *lshrdi3_1 splitter): Delay splitting after flow2 pass only when (optimize > 0 && flag_peephole2). testsuite: PR target/24315 * gcc.target/i386/pr24315.c: New test. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.10169&r2=2.10170 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.6201&r2=1.6202 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.target/i386/pr24315.c.diff?cvsroot=gcc&r1=NONE&r2=1.1 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/i386/i386.md.diff?cvsroot=gcc&r1=1.659&r2=1.660 Fixed on mainline. The bugfix is really trivial to fix, but I don't have older branches installed here. Could somebody help me with a backports? Subject: Bug 24315 Author: uros Date: Tue Nov 8 07:58:51 2005 New Revision: 106633 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=106633 Log: PR target/19340 * reg-stack.c (reg_to_stack): Update register liveness also for flag_sched2_use_traces. PR target/24315 * config/i386/i386.md (*pushdi2_rex64 splitter) (*movdi_1_rex64 splitter, *ashldi3_1 splitter) (*ashrdi3_1 splitter, *lshrdi3_1 splitter): Delay splitting after flow2 pass only when (optimize > 0 && flag_peephole2). testsuite/ PR target/19340 * gcc.dg/pr19340.c: New test. PR target/24315 * gcc.target/i386/pr24315.c: New test. Added: branches/gcc-4_0-branch/gcc/testsuite/gcc.dg/pr19340.c branches/gcc-4_0-branch/gcc/testsuite/gcc.target/i386/pr24315.c Modified: branches/gcc-4_0-branch/gcc/ChangeLog branches/gcc-4_0-branch/gcc/config/i386/i386.md branches/gcc-4_0-branch/gcc/reg-stack.c branches/gcc-4_0-branch/gcc/testsuite/ChangeLog now fixed on 4.0 branch too Subject: Bug 24315 Author: uros Date: Thu Nov 10 07:27:47 2005 New Revision: 106728 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=106728 Log: PR target/24315 * config/i386/i386.md (*pushdi2_rex64 splitter) (*movdi_1_rex64 splitter): Delay splitting after flow2 pass only when (optimize > 0 && flag_peephole2). PR target/19340 * reg-stack.c (reg_to_stack): Update register liveness also for flag_sched2_use_traces. testsuite/ PR target/24315 * gcc.dg/pr24315.c: New test. PR target/19340 * gcc.dg/pr19340.c: New test. Added: branches/gcc-3_4-branch/gcc/testsuite/gcc.dg/pr19340.c - copied unchanged from r106632, trunk/gcc/testsuite/gcc.dg/pr19340.c branches/gcc-3_4-branch/gcc/testsuite/gcc.dg/pr24315.c Modified: branches/gcc-3_4-branch/gcc/ChangeLog branches/gcc-3_4-branch/gcc/config/i386/i386.md branches/gcc-3_4-branch/gcc/reg-stack.c branches/gcc-3_4-branch/gcc/testsuite/ChangeLog Fixed on 3.4 branch. |