diff options
author | Richard Sandiford <rsandifo@gcc.gnu.org> | 2017-08-30 11:11:16 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2017-08-30 11:11:16 +0000 |
commit | 673bf5a6b65e51d177d2cf9fc4002171b1f467ab (patch) | |
tree | 6c897f8eed13c0d78998341ce2a350c204fa4667 /gcc/simplify-rtx.c | |
parent | 45e8e706e295e7770d02c6d9c9798f4bab7ab524 (diff) | |
download | gcc-673bf5a6b65e51d177d2cf9fc4002171b1f467ab.zip gcc-673bf5a6b65e51d177d2cf9fc4002171b1f467ab.tar.gz gcc-673bf5a6b65e51d177d2cf9fc4002171b1f467ab.tar.bz2 |
[23/77] Replace != VOIDmode checks with is_a <scalar_int_mode>
This patch replaces some checks against VOIDmode with checks
of is_a <scalar_int_mode>, in cases where scalar integer modes
were the only useful alternatives left.
gcc/
2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* cfgexpand.c (expand_debug_expr): Use is_a <scalar_int_mode>
instead of != VOIDmode.
* combine.c (if_then_else_cond): Likewise.
(change_zero_ext): Likewise.
* dwarf2out.c (mem_loc_descriptor): Likewise.
(loc_descriptor): Likewise.
* rtlanal.c (canonicalize_condition): Likewise.
* simplify-rtx.c (simplify_relational_operation_1): Likewise.
From-SVN: r251475
Diffstat (limited to 'gcc/simplify-rtx.c')
-rw-r--r-- | gcc/simplify-rtx.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c index bf8abdb..0c91dbb 100644 --- a/gcc/simplify-rtx.c +++ b/gcc/simplify-rtx.c @@ -4829,19 +4829,19 @@ simplify_relational_operation_1 (enum rtx_code code, machine_mode mode, /* (ne:SI (zero_extract:SI FOO (const_int 1) BAR) (const_int 0))) is the same as (zero_extract:SI FOO (const_int 1) BAR). */ - scalar_int_mode int_mode; + scalar_int_mode int_mode, int_cmp_mode; if (code == NE && op1 == const0_rtx && is_int_mode (mode, &int_mode) - && cmp_mode != VOIDmode + && is_a <scalar_int_mode> (cmp_mode, &int_cmp_mode) /* ??? Work-around BImode bugs in the ia64 backend. */ && int_mode != BImode - && cmp_mode != BImode - && nonzero_bits (op0, cmp_mode) == 1 + && int_cmp_mode != BImode + && nonzero_bits (op0, int_cmp_mode) == 1 && STORE_FLAG_VALUE == 1) - return GET_MODE_SIZE (int_mode) > GET_MODE_SIZE (cmp_mode) - ? simplify_gen_unary (ZERO_EXTEND, int_mode, op0, cmp_mode) - : lowpart_subreg (int_mode, op0, cmp_mode); + return GET_MODE_SIZE (int_mode) > GET_MODE_SIZE (int_cmp_mode) + ? simplify_gen_unary (ZERO_EXTEND, int_mode, op0, int_cmp_mode) + : lowpart_subreg (int_mode, op0, int_cmp_mode); /* (eq/ne (xor x y) 0) simplifies to (eq/ne x y). */ if ((code == EQ || code == NE) |