diff options
author | Andrew Pinski <apinski@cavium.com> | 2012-11-02 23:32:32 +0000 |
---|---|---|
committer | Andrew Pinski <pinskia@gcc.gnu.org> | 2012-11-02 16:32:32 -0700 |
commit | 5352ea68e36a461476228c109a31a4fb5bad7ce7 (patch) | |
tree | b2da9394c1af97b14041472f1c6a7ffc41a66ccd /gcc/simplify-rtx.c | |
parent | 556ea3915a6b4f1ee4a81a73175b715663b836e2 (diff) | |
download | gcc-5352ea68e36a461476228c109a31a4fb5bad7ce7.zip gcc-5352ea68e36a461476228c109a31a4fb5bad7ce7.tar.gz gcc-5352ea68e36a461476228c109a31a4fb5bad7ce7.tar.bz2 |
re PR rtl-optimization/54524 (Spurious add on sum of bitshifts (forward-propagate issue))
2012-11-02 Andrew Pinski <apinski@cavium.com>
PR rtl-opt/54524
* simplify-rtx.c (simplify_relational_operation_1): Don't simplify
(LTU/GEU (PLUS a 0) 0) into (GEU/LTU a 0) since they are not equivalent.
From-SVN: r193111
Diffstat (limited to 'gcc/simplify-rtx.c')
-rw-r--r-- | gcc/simplify-rtx.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c index cb63b80..6c50d30 100644 --- a/gcc/simplify-rtx.c +++ b/gcc/simplify-rtx.c @@ -4546,7 +4546,9 @@ simplify_relational_operation_1 (enum rtx_code code, enum machine_mode mode, && GET_CODE (op0) == PLUS && CONST_INT_P (XEXP (op0, 1)) && (rtx_equal_p (op1, XEXP (op0, 0)) - || rtx_equal_p (op1, XEXP (op0, 1)))) + || rtx_equal_p (op1, XEXP (op0, 1))) + /* (LTU/GEU (PLUS a 0) 0) is not the same as (GEU/LTU a 0). */ + && XEXP (op0, 1) != const0_rtx) { rtx new_cmp = simplify_gen_unary (NEG, cmp_mode, XEXP (op0, 1), cmp_mode); |