Commit a8c50132 by Eric Botcazou Committed by Eric Botcazou

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
parent 44626634
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> 2013-05-31 Segher Boessenkool <segher@kernel.crashing.org>
* config/rs6000/rs6000-opts.h (enum processor_type): Reorder. * config/rs6000/rs6000-opts.h (enum processor_type): Reorder.
......
...@@ -2067,8 +2067,7 @@ simplify_byte_swapping_operation (enum rtx_code code, enum machine_mode mode, ...@@ -2067,8 +2067,7 @@ simplify_byte_swapping_operation (enum rtx_code code, enum machine_mode mode,
rtx tem; rtx tem;
/* (op (bswap x) C1)) -> (bswap (op x C2)) with C2 swapped. */ /* (op (bswap x) C1)) -> (bswap (op x C2)) with C2 swapped. */
if (GET_CODE (op0) == BSWAP if (GET_CODE (op0) == BSWAP && CONST_SCALAR_INT_P (op1))
&& (CONST_INT_P (op1) || CONST_DOUBLE_AS_INT_P (op1)))
{ {
tem = simplify_gen_binary (code, mode, XEXP (op0, 0), tem = simplify_gen_binary (code, mode, XEXP (op0, 0),
simplify_gen_unary (BSWAP, mode, op1, mode)); simplify_gen_unary (BSWAP, mode, op1, mode));
...@@ -4814,7 +4813,7 @@ simplify_relational_operation_1 (enum rtx_code code, enum machine_mode 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. */ /* (eq/ne (bswap x) C1) simplifies to (eq/ne x C2) with C2 swapped. */
if ((code == EQ || code == NE) if ((code == EQ || code == NE)
&& GET_CODE (op0) == BSWAP && 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), return simplify_gen_relational (code, mode, cmp_mode, XEXP (op0, 0),
simplify_gen_unary (BSWAP, cmp_mode, simplify_gen_unary (BSWAP, cmp_mode,
op1, cmp_mode)); op1, cmp_mode));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment