diff options
Diffstat (limited to 'gcc/ifcvt.c')
-rw-r--r-- | gcc/ifcvt.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/ifcvt.c b/gcc/ifcvt.c index 46a13c4..9a646a6 100644 --- a/gcc/ifcvt.c +++ b/gcc/ifcvt.c @@ -2808,7 +2808,7 @@ noce_try_bitop (struct noce_if_info *if_info) { rtx cond, x, a, result; rtx_insn *seq; - machine_mode mode; + scalar_int_mode mode; enum rtx_code code; int bitnum; @@ -2816,6 +2816,10 @@ noce_try_bitop (struct noce_if_info *if_info) cond = if_info->cond; code = GET_CODE (cond); + /* Check for an integer operation. */ + if (!is_a <scalar_int_mode> (GET_MODE (x), &mode)) + return FALSE; + if (!noce_simple_bbs (if_info)) return FALSE; @@ -2838,7 +2842,6 @@ noce_try_bitop (struct noce_if_info *if_info) || ! rtx_equal_p (x, XEXP (cond, 0))) return FALSE; bitnum = INTVAL (XEXP (cond, 2)); - mode = GET_MODE (x); if (BITS_BIG_ENDIAN) bitnum = GET_MODE_BITSIZE (mode) - 1 - bitnum; if (bitnum < 0 || bitnum >= HOST_BITS_PER_WIDE_INT) |