public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/25554]  New: [4.0 Regression] unrecognizable insn on x86_64 with -O2 -ftracer
@ 2005-12-24  4:26 halcy0n at gentoo dot org
  2005-12-24  4:38 ` [Bug tree-optimization/25554] [3.4/4.0/4.1/4.2 Regression] unrecognizable insn on x86_64 with -O2 -ftracer ( -fno-tree-dominator-opts on the mainline) pinskia at gcc dot gnu dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: halcy0n at gentoo dot org @ 2005-12-24  4:26 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2444 bytes --]

When compiling the supplied test case with `gcc -c -O2 -ftracer test.c` with
gcc-4.0.3 the following error occurs:

test.c: In function ‘mpfr_pow_ui’:
test.c:18: error: unrecognizable insn:
(insn 96 44 46 6 (set (reg:CCZ 17 flags)
        (compare:CCZ (and:DI (reg/v:DI 66 [ n ])
                (const_int 4611686018427387904 [0x4000000000000000]))
            (const_int 0 [0x0]))) -1 (nil)
    (expr_list:REG_DEAD (reg/v:DI 66 [ n ])
        (nil)))
test.c:18: internal compiler error: in extract_insn, at recog.c:2020


This does not occur in 3.4, 4.1, or 4.2.  Revision 98597 on gcc-4_1-branch
seems to be where it was fixed for 4.1.  Here is the testcase I am using:

unsigned int __gmpfr_flags;                                                     

int                                                                             
mpfr_pow_ui (unsigned long int n)                                               
{                                                                               
  unsigned long m;                                                              
  int inexact;                                                                  

  int i;                                                                        
  for (m = n, i = 0; m; i++, m >>= 1)                                           
    ;                                                                           

  ((void) (__gmpfr_flags &= 31 ^ 1));                                           

  if (n & (1UL << (i-2)))                                                       
    return 0;                                                                   

}

Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-4/configure --prefix=/home/halcy0n/gcc-test/bin-4/
--enable-languages=c,c++ --disable-multilib
Thread model: posix
gcc version 4.0.3 20051222 (prerelease)


-- 
           Summary: [4.0 Regression] unrecognizable insn on x86_64 with -O2
                    -ftracer
           Product: gcc
           Version: 4.0.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: halcy0n at gentoo dot org
 GCC build triplet: x86_64-pc-linux-gnu
  GCC host triplet: x86_64-pc-linux-gnu
GCC target triplet: x86_64-pc-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25554


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug tree-optimization/25554] [3.4/4.0/4.1/4.2 Regression] unrecognizable insn on x86_64 with -O2 -ftracer ( -fno-tree-dominator-opts on the mainline)
  2005-12-24  4:26 [Bug tree-optimization/25554] New: [4.0 Regression] unrecognizable insn on x86_64 with -O2 -ftracer halcy0n at gentoo dot org
@ 2005-12-24  4:38 ` pinskia at gcc dot gnu dot org
  2005-12-28 16:04 ` jakub at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-12-24  4:38 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2005-12-24 04:38 -------
Better testcase which shows it also on the 3.4 branch:
unsigned int __gmpfr_flags;
int
f (unsigned long int n)
{
  int prephitmp3;
  int i;
  long unsigned int m;
  if (n == 0)
    prephitmp3 = -2;
else
  {
  m = n;
  i = 0;

do {
  i = i + 1;
  m = m >> 1;
  } while (m != 0);

  prephitmp3 = i - 2;
}

  __gmpfr_flags = __gmpfr_flags & 30;
  if (((int) (n >> prephitmp3) & 1) != 0) return 0;
}

This also shows up on the mainline with "-O2 -ftracer 
-fno-tree-dominator-opts".

Confirmed, 3.3.6 actually worked fully with -O2 -ftracer so this is a
regression from that version.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |ice-on-valid-code
      Known to fail|4.0.3                       |4.0.3 3.4.5 4.1.0 4.2.0
      Known to work|3.4.5 4.1.0 4.2.0           |3.3.6
   Last reconfirmed|0000-00-00 00:00:00         |2005-12-24 04:38:07
               date|                            |
            Summary|[4.0 Regression]            |[3.4/4.0/4.1/4.2 Regression]
                   |unrecognizable insn on      |unrecognizable insn on
                   |x86_64 with -O2 -ftracer    |x86_64 with -O2 -ftracer ( -
                   |                            |fno-tree-dominator-opts on
                   |                            |the mainline)
   Target Milestone|---                         |4.0.3


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25554


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug tree-optimization/25554] [3.4/4.0/4.1/4.2 Regression] unrecognizable insn on x86_64 with -O2 -ftracer ( -fno-tree-dominator-opts on the mainline)
  2005-12-24  4:26 [Bug tree-optimization/25554] New: [4.0 Regression] unrecognizable insn on x86_64 with -O2 -ftracer halcy0n at gentoo dot org
  2005-12-24  4:38 ` [Bug tree-optimization/25554] [3.4/4.0/4.1/4.2 Regression] unrecognizable insn on x86_64 with -O2 -ftracer ( -fno-tree-dominator-opts on the mainline) pinskia at gcc dot gnu dot org
@ 2005-12-28 16:04 ` jakub at gcc dot gnu dot org
  2006-01-04  8:15 ` [Bug target/25554] " jakub at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu dot org @ 2005-12-28 16:04 UTC (permalink / raw)
  To: gcc-bugs



-- 

jakub at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |jakub at gcc dot gnu dot org
                   |dot org                     |
                URL|                            |http://gcc.gnu.org/ml/gcc-
                   |                            |patches/2005-
                   |                            |12/msg01875.html
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2005-12-24 04:38:07         |2005-12-28 16:04:36
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25554


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/25554] [3.4/4.0/4.1/4.2 Regression] unrecognizable insn on x86_64 with -O2 -ftracer ( -fno-tree-dominator-opts on the mainline)
  2005-12-24  4:26 [Bug tree-optimization/25554] New: [4.0 Regression] unrecognizable insn on x86_64 with -O2 -ftracer halcy0n at gentoo dot org
  2005-12-24  4:38 ` [Bug tree-optimization/25554] [3.4/4.0/4.1/4.2 Regression] unrecognizable insn on x86_64 with -O2 -ftracer ( -fno-tree-dominator-opts on the mainline) pinskia at gcc dot gnu dot org
  2005-12-28 16:04 ` jakub at gcc dot gnu dot org
@ 2006-01-04  8:15 ` jakub at gcc dot gnu dot org
  2006-01-04  9:17 ` jakub at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu dot org @ 2006-01-04  8:15 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from jakub at gcc dot gnu dot org  2006-01-04 08:15 -------
Subject: Bug 25554

Author: jakub
Date: Wed Jan  4 08:15:06 2006
New Revision: 109317

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=109317
Log:
        PR target/25554
        * config/i386/i386.md (testqi_ext_3): Ensure len is positive
        and pos non-negative and pos + len <= 32.
        (testqi_ext_3_rex64): Ensure len is positive and pos non-negative,
        drop pos + len < HOST_BITS_PER_WIDE_INT test.
        (testqi_ext_3* splitter): Handle pos + len == HOST_BITS_PER_WIDE_INT.

        * gcc.c-torture/compile/20051228-1.c: New test.

Added:
    trunk/gcc/testsuite/gcc.c-torture/compile/20051228-1.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/i386/i386.md
    trunk/gcc/testsuite/ChangeLog


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25554



^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/25554] [3.4/4.0/4.1/4.2 Regression] unrecognizable insn on x86_64 with -O2 -ftracer ( -fno-tree-dominator-opts on the mainline)
  2005-12-24  4:26 [Bug tree-optimization/25554] New: [4.0 Regression] unrecognizable insn on x86_64 with -O2 -ftracer halcy0n at gentoo dot org
                   ` (2 preceding siblings ...)
  2006-01-04  8:15 ` [Bug target/25554] " jakub at gcc dot gnu dot org
@ 2006-01-04  9:17 ` jakub at gcc dot gnu dot org
  2006-01-04 12:29 ` jakub at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu dot org @ 2006-01-04  9:17 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from jakub at gcc dot gnu dot org  2006-01-04 09:17 -------
Subject: Bug 25554

Author: jakub
Date: Wed Jan  4 09:17:16 2006
New Revision: 109321

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=109321
Log:
        PR target/25554
        * config/i386/i386.md (testqi_ext_3): Ensure len is positive
        and pos non-negative and pos + len <= 32.
        (testqi_ext_3_rex64): Ensure len is positive and pos non-negative,
        drop pos + len < HOST_BITS_PER_WIDE_INT test.
        (testqi_ext_3* splitter): Handle pos + len == HOST_BITS_PER_WIDE_INT.

        * gcc.c-torture/compile/20051228-1.c: New test.

Added:
    branches/gcc-4_1-branch/gcc/testsuite/gcc.c-torture/compile/20051228-1.c
Modified:
    branches/gcc-4_1-branch/gcc/ChangeLog
    branches/gcc-4_1-branch/gcc/config/i386/i386.md
    branches/gcc-4_1-branch/gcc/testsuite/ChangeLog


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25554



^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/25554] [3.4/4.0/4.1/4.2 Regression] unrecognizable insn on x86_64 with -O2 -ftracer ( -fno-tree-dominator-opts on the mainline)
  2005-12-24  4:26 [Bug tree-optimization/25554] New: [4.0 Regression] unrecognizable insn on x86_64 with -O2 -ftracer halcy0n at gentoo dot org
                   ` (3 preceding siblings ...)
  2006-01-04  9:17 ` jakub at gcc dot gnu dot org
@ 2006-01-04 12:29 ` jakub at gcc dot gnu dot org
  2006-01-04 12:34 ` jakub at gcc dot gnu dot org
  2006-03-01  5:04 ` [Bug target/25554] [3.4 " gdr at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu dot org @ 2006-01-04 12:29 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from jakub at gcc dot gnu dot org  2006-01-04 12:29 -------
Subject: Bug 25554

Author: jakub
Date: Wed Jan  4 12:29:14 2006
New Revision: 109327

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=109327
Log:
        PR target/25554
        * config/i386/i386.md (testqi_ext_3): Ensure len is positive
        and pos non-negative and pos + len <= 32.
        (testqi_ext_3_rex64): Ensure len is positive and pos non-negative,
        drop pos + len < HOST_BITS_PER_WIDE_INT test.
        (testqi_ext_3* splitter): Handle pos + len == HOST_BITS_PER_WIDE_INT.

        * gcc.c-torture/compile/20051228-1.c: New test.

Added:
    branches/gcc-4_0-branch/gcc/testsuite/gcc.c-torture/compile/20051228-1.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/testsuite/ChangeLog


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25554



^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/25554] [3.4/4.0/4.1/4.2 Regression] unrecognizable insn on x86_64 with -O2 -ftracer ( -fno-tree-dominator-opts on the mainline)
  2005-12-24  4:26 [Bug tree-optimization/25554] New: [4.0 Regression] unrecognizable insn on x86_64 with -O2 -ftracer halcy0n at gentoo dot org
                   ` (4 preceding siblings ...)
  2006-01-04 12:29 ` jakub at gcc dot gnu dot org
@ 2006-01-04 12:34 ` jakub at gcc dot gnu dot org
  2006-03-01  5:04 ` [Bug target/25554] [3.4 " gdr at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu dot org @ 2006-01-04 12:34 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from jakub at gcc dot gnu dot org  2006-01-04 12:34 -------
Fixed on 4.0/4.1 branches and trunk.


-- 

jakub at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|4.0.3 3.4.5 4.1.0 4.2.0     |3.4.5
      Known to work|3.3.6                       |3.3.6 4.0.3 4.1.0 4.2.0
   Target Milestone|4.0.3                       |3.4.6


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25554



^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/25554] [3.4 Regression] unrecognizable insn on x86_64 with -O2 -ftracer ( -fno-tree-dominator-opts on the mainline)
  2005-12-24  4:26 [Bug tree-optimization/25554] New: [4.0 Regression] unrecognizable insn on x86_64 with -O2 -ftracer halcy0n at gentoo dot org
                   ` (5 preceding siblings ...)
  2006-01-04 12:34 ` jakub at gcc dot gnu dot org
@ 2006-03-01  5:04 ` gdr at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: gdr at gcc dot gnu dot org @ 2006-03-01  5:04 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from gdr at gcc dot gnu dot org  2006-03-01 05:04 -------
Fixed in 4.0.3 and up


-- 

gdr at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|3.4.6                       |4.0.3


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25554


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2006-03-01  5:04 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-12-24  4:26 [Bug tree-optimization/25554] New: [4.0 Regression] unrecognizable insn on x86_64 with -O2 -ftracer halcy0n at gentoo dot org
2005-12-24  4:38 ` [Bug tree-optimization/25554] [3.4/4.0/4.1/4.2 Regression] unrecognizable insn on x86_64 with -O2 -ftracer ( -fno-tree-dominator-opts on the mainline) pinskia at gcc dot gnu dot org
2005-12-28 16:04 ` jakub at gcc dot gnu dot org
2006-01-04  8:15 ` [Bug target/25554] " jakub at gcc dot gnu dot org
2006-01-04  9:17 ` jakub at gcc dot gnu dot org
2006-01-04 12:29 ` jakub at gcc dot gnu dot org
2006-01-04 12:34 ` jakub at gcc dot gnu dot org
2006-03-01  5:04 ` [Bug target/25554] [3.4 " gdr at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).