re PR rtl-optimization/17099 (Bootstrap failure on powerpc64-redhat-linux)
[gcc.git] / gcc / combine.c
index 426b0d775e5818b259b2c350e5a52762e14431c9..a116f81360c09c1cb50972529b4c8da9171893cd 100644 (file)
@@ -7151,9 +7151,8 @@ force_to_mode (rtx x, enum machine_mode mode, unsigned HOST_WIDE_INT mask,
 
          /* We can only change the mode of the shift if we can do arithmetic
             in the mode of the shift and INNER_MASK is no wider than the
-            width of OP_MODE.  */
-         if (GET_MODE_BITSIZE (op_mode) > HOST_BITS_PER_WIDE_INT
-             || (inner_mask & ~GET_MODE_MASK (op_mode)) != 0)
+            width of X's mode.  */
+         if ((inner_mask & ~GET_MODE_MASK (GET_MODE (x))) != 0)
            op_mode = GET_MODE (x);
 
          inner = force_to_mode (inner, op_mode, inner_mask, reg, next_select);