diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2013-05-31 19:08:51 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2013-05-31 19:08:51 +0000 |
commit | a8c50132e9e2c02c1692088b0f8aaad7a8716f4d (patch) | |
tree | 54144a0f79f74c118d8df590fecac3302383865d /gcc | |
parent | 44626634cd43da48f2a471fc5b4dfb1e482e6e6f (diff) | |
download | gcc-a8c50132e9e2c02c1692088b0f8aaad7a8716f4d.zip gcc-a8c50132e9e2c02c1692088b0f8aaad7a8716f4d.tar.gz gcc-a8c50132e9e2c02c1692088b0f8aaad7a8716f4d.tar.bz2 |
simplify-rtx.c (simplify_byte_swapping_operation): Use proper macro for constant scalar integers.
* simplify-rtx.c (simplify_byte_swapping_operation): Use proper macro
for constant scalar integers.
(simplify_relational_operation_1): Likewise.
From-SVN: r199556
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/simplify-rtx.c | 5 |
2 files changed, 8 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 889c6d2..0894c50 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2013-05-31 Eric Botcazou <ebotcazou@adacore.com> + + * simplify-rtx.c (simplify_byte_swapping_operation): Use proper macro + for constant scalar integers. + (simplify_relational_operation_1): Likewise. + 2013-05-31 Segher Boessenkool <segher@kernel.crashing.org> * config/rs6000/rs6000-opts.h (enum processor_type): Reorder. diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c index 5c1dd25..9bb31e7 100644 --- a/gcc/simplify-rtx.c +++ b/gcc/simplify-rtx.c @@ -2067,8 +2067,7 @@ simplify_byte_swapping_operation (enum rtx_code code, enum machine_mode mode, rtx tem; /* (op (bswap x) C1)) -> (bswap (op x C2)) with C2 swapped. */ - if (GET_CODE (op0) == BSWAP - && (CONST_INT_P (op1) || CONST_DOUBLE_AS_INT_P (op1))) + if (GET_CODE (op0) == BSWAP && CONST_SCALAR_INT_P (op1)) { tem = simplify_gen_binary (code, mode, XEXP (op0, 0), simplify_gen_unary (BSWAP, mode, op1, mode)); @@ -4814,7 +4813,7 @@ simplify_relational_operation_1 (enum rtx_code code, enum machine_mode mode, /* (eq/ne (bswap x) C1) simplifies to (eq/ne x C2) with C2 swapped. */ if ((code == EQ || code == NE) && GET_CODE (op0) == BSWAP - && (CONST_INT_P (op1) || CONST_DOUBLE_AS_INT_P (op1))) + && CONST_SCALAR_INT_P (op1)) return simplify_gen_relational (code, mode, cmp_mode, XEXP (op0, 0), simplify_gen_unary (BSWAP, cmp_mode, op1, cmp_mode)); |