combine.c (find_split_point): Don't turn a SIGN_EXTEND into a series of shifts if...
authorJeff Law <law@gcc.gnu.org>
Wed, 19 Feb 1997 18:18:06 +0000 (11:18 -0700)
committerJeff Law <law@gcc.gnu.org>
Wed, 19 Feb 1997 18:18:06 +0000 (11:18 -0700)
        * combine.c (find_split_point): Don't turn a SIGN_EXTEND into
        a series of shifts if either mode is a partial integer mode.

From-SVN: r13665

gcc/combine.c

index 2265eb3e53771567db0fd941ed0f89ef952d69d8..6a6ebb4dbfa2d78b2d6b0c9a472af98fc77f04b0 100644 (file)
@@ -2699,6 +2699,14 @@ find_split_point (loc, insn)
 
        case SIGN_EXTEND:
          inner = XEXP (SET_SRC (x), 0);
+
+         /* We can't optimize if either mode is a partial integer
+            mode as we don't know how many bits are significant
+            in those modes.  */
+         if (GET_MODE_CLASS (GET_MODE (inner)) == MODE_PARTIAL_INT
+             || GET_MODE_CLASS (GET_MODE (SET_SRC (x))) == MODE_PARTIAL_INT)
+           break;
+
          pos = 0;
          len = GET_MODE_BITSIZE (GET_MODE (inner));
          unsignedp = 0;