re PR rtl-optimization/13821 (IRIX 6.5 bootstrap failure: ICE in simplify_gen_subreg)
authorRoger Sayle <roger@eyesopen.com>
Fri, 23 Jan 2004 01:47:15 +0000 (01:47 +0000)
committerRoger Sayle <sayle@gcc.gnu.org>
Fri, 23 Jan 2004 01:47:15 +0000 (01:47 +0000)
PR optimization/13821
* simplify-rtx.c (simplify_subreg): Use subreg_lowpart_offset to
correctly calculate the lowpart offset of the contracted subreg.

From-SVN: r76393

gcc/ChangeLog
gcc/simplify-rtx.c

index ccb1dd177183b8c7860b8f6602de396aff455658..d8006ca02ecf6b5854357cfa36e8426e9738a60a 100644 (file)
@@ -1,3 +1,9 @@
+2004-01-22  Roger Sayle  <roger@eyesopen.com>
+
+       PR optimization/13821
+       * simplify-rtx.c (simplify_subreg): Use subreg_lowpart_offset to
+       correctly calculate the lowpart offset of the contracted subreg.
+
 2004-01-22  Ian Lance Taylor  <ian@wasabisystems.com>
 
        * doc/invoke.texi (Optimize Options): Note that --param arguments
index 5ba6882e680386996d63915a57bac01697f6a0eb..cebbf04b4601861b0cf7c91dbc001cf339a06491 100644 (file)
@@ -3404,8 +3404,9 @@ simplify_subreg (enum machine_mode outermode, rtx op,
          if (outermode == origmode)
            return XEXP (op, 0);
          if (GET_MODE_BITSIZE (outermode) <= GET_MODE_BITSIZE (origmode))
-           return simplify_gen_subreg (outermode, XEXP (op, 0),
-                                       origmode, byte);
+           return simplify_gen_subreg (outermode, XEXP (op, 0), origmode,
+                                       subreg_lowpart_offset (outermode,
+                                                              origmode));
          if (SCALAR_INT_MODE_P (outermode))
            return simplify_gen_unary (GET_CODE (op), outermode,
                                       XEXP (op, 0), origmode);