summaryrefslogtreecommitdiffstats
path: root/gcc
diff options
context:
space:
mode:
authorpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>2012-11-02 23:32:32 +0000
committerpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>2012-11-02 23:32:32 +0000
commitca6e8538b157fc3a5b7629d19f4b0ed15e1ee9c0 (patch)
treeb2da9394c1af97b14041472f1c6a7ffc41a66ccd /gcc
parent086f95898fe86dccdfa10c90a81b19bf80fec771 (diff)
downloadppe42-gcc-ca6e8538b157fc3a5b7629d19f4b0ed15e1ee9c0.tar.gz
ppe42-gcc-ca6e8538b157fc3a5b7629d19f4b0ed15e1ee9c0.zip
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@193111 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/simplify-rtx.c4
2 files changed, 9 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 284dd8a1520..ada7ff5e786 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+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.
+
2012-11-02 Jan Hubicka <jh@suse.cz>
* tree-ssa-loop-niter.c (double_int_cmp, bound_index,
diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c
index cb63b80500e..6c50d301fe0 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);
OpenPOWER on IntegriCloud