]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR rtl-optimization/39241 (ICE in subreg_get_info, at rtlanal.c:3104)
authorH.J. Lu <hjl@gcc.gnu.org>
Wed, 25 Feb 2009 18:49:28 +0000 (10:49 -0800)
committerH.J. Lu <hjl@gcc.gnu.org>
Wed, 25 Feb 2009 18:49:28 +0000 (10:49 -0800)
gcc/

2008-02-25  H.J. Lu  <hongjiu.lu@intel.com>

PR rtl-optimization/39241
* jump.c (rtx_renumbered_equal_p): Remove 2 superfluous calls
to subreg_offset_representable_p.

gcc/testsuite/

2008-02-25  H.J. Lu  <hongjiu.lu@intel.com>

PR rtl-optimization/39241
* gcc.dg/torture/pr39241.c: New.

From-SVN: r144430

gcc/ChangeLog
gcc/jump.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/torture/pr39241.c [new file with mode: 0644]

index 2b02471d1bd66e89c921abc7ea322f1b8895a63a..94c16afd47d6bc3d4ffdfb03be389bbf138da186 100644 (file)
@@ -1,3 +1,9 @@
+2008-02-25  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR rtl-optimization/39241
+       * jump.c (rtx_renumbered_equal_p): Remove 2 superfluous calls
+       to subreg_offset_representable_p.
+
 2009-02-25  Paolo Bonzini  <bonzini@gnu.org>
 
        * regmove.c (regmove_optimize): Conform to struct rtl_opt_pass
@@ -44,7 +50,7 @@
        * dwarf2out.c (gen_enumeration_type_die): Handle CONST_DECLs.
 
 2009-02-24  Richard Guenther  <rguenther@suse.de>
-       Zdenek Dvorak  <ook@ucw.cz>
+           Zdenek Dvorak  <ook@ucw.cz>
 
        PR tree-optimization/39233
        * tree-ssa-loop-ivopts.c (add_candidate_1): Do not except pointers
index 4f598220dffc34cf3107a033a3e83072f4d306e4..2b9a9545223bd6e2e02c83029e57da6abc5f2097 100644 (file)
@@ -1,6 +1,6 @@
 /* Optimize jump instructions, for GNU compiler.
    Copyright (C) 1987, 1988, 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997
-   1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008
+   1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009
    Free Software Foundation, Inc.
 
 This file is part of GCC.
@@ -1563,11 +1563,6 @@ rtx_renumbered_equal_p (const_rtx x, const_rtx y)
                                           GET_MODE (x));
              byte_x = 0;
            }
-         else if (!subreg_offset_representable_p (reg_x,
-                                                  GET_MODE (SUBREG_REG (x)),
-                                                  byte_x,
-                                                  GET_MODE (x)))
-           return 0;
        }
       else
        {
@@ -1594,11 +1589,6 @@ rtx_renumbered_equal_p (const_rtx x, const_rtx y)
                                           GET_MODE (y));
              byte_y = 0;
            }
-         else if (!subreg_offset_representable_p (reg_y,
-                                                  GET_MODE (SUBREG_REG (y)),
-                                                  byte_y,
-                                                  GET_MODE (y)))
-           return 0;
        }
       else
        {
index 4e54e54b06de3afc12de8dbfc40b44e08a9d89dd..ab3f4d8e0b7d48e13c9630984a0d6b6bba41d6f4 100644 (file)
@@ -1,4 +1,10 @@
+2008-02-25  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR rtl-optimization/39241
+       * gcc.dg/torture/pr39241.c: New.
+
 2009-02-25  Martin Jambor  <mjambor@suse.cz>
+
        PR tree-optimizations/39259
        * g++.dg/torture/pr39259.C: New testcase.
 
@@ -8,7 +14,7 @@
        * g++.dg/template/instantiate10.C: New testcase.
 
 2009-02-24  Richard Guenther  <rguenther@suse.de>
-       Zdenek Dvorak  <ook@ucw.cz>
+           Zdenek Dvorak  <ook@ucw.cz>
 
        PR tree-optimization/39233
        * gcc.c-torture/execute/pr39233.c: New testcase.
diff --git a/gcc/testsuite/gcc.dg/torture/pr39241.c b/gcc/testsuite/gcc.dg/torture/pr39241.c
new file mode 100644 (file)
index 0000000..860a04d
--- /dev/null
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-w" } */
+
+static inline int
+foo (float f)
+{
+  return *((int *) &f) - 1;
+}
+
+float
+bar (float x, float y, float *z)
+{
+  float c = y < 0.002f ? 0.002f : y;
+  float d = x < c ? c : x;
+  return z[foo (c)] + z[foo (d * 255.0f)];
+}