aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.6/gcc/cse.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.6/gcc/cse.c')
-rw-r--r--gcc-4.6/gcc/cse.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc-4.6/gcc/cse.c b/gcc-4.6/gcc/cse.c
index 078977fbc..760911424 100644
--- a/gcc-4.6/gcc/cse.c
+++ b/gcc-4.6/gcc/cse.c
@@ -3054,6 +3054,12 @@ find_comparison_args (enum rtx_code code, rtx *parg1, rtx *parg2,
if (! exp_equiv_p (p->exp, p->exp, 1, false))
continue;
+ /* If it's the same comparison we're already looking at, skip it. */
+ if (COMPARISON_P (p->exp)
+ && XEXP (p->exp, 0) == arg1
+ && XEXP (p->exp, 1) == arg2)
+ continue;
+
if (GET_CODE (p->exp) == COMPARE
/* Another possibility is that this machine has a compare insn
that includes the comparison code. In that case, ARG1 would