summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsegher <segher@138bc75d-0d04-0410-961f-82ee72b054a4>2014-12-19 19:55:32 +0000
committersegher <segher@138bc75d-0d04-0410-961f-82ee72b054a4>2014-12-19 19:55:32 +0000
commit99f34dd57e154e1cf3d3858219cbf16cae9db537 (patch)
treebe4cb40019eebce167073443dc4dd6793e7e4554
parent7ecafe6b63061bd8d3377f3960b50681feb60be2 (diff)
downloadgcc-99f34dd57e154e1cf3d3858219cbf16cae9db537.tar.gz
PR target/64268
* combine.c (try_combine): Immediately return if any of I0,I1,I2 are the same insn. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@218971 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/combine.c5
2 files changed, 11 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index e5733ae9c88..a800fed4a18 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2014-12-19 Segher Boessenkool <segher@kernel.crashing.org>
+
+ PR target/64268
+ * combine.c (try_combine): Immediately return if any of I0,I1,I2
+ are the same insn.
+
2014-12-19 Alan Lawrence <alan.lawrence@arm.com>
* config/aarch64/aarch64.c (<LOGICAL:optab>_one_cmpl<mode>3):
diff --git a/gcc/combine.c b/gcc/combine.c
index ee7b3f9ec5f..212da3320f3 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -2588,6 +2588,11 @@ try_combine (rtx_insn *i3, rtx_insn *i2, rtx_insn *i1, rtx_insn *i0,
rtx new_other_notes;
int i;
+ /* Immediately return if any of I0,I1,I2 are the same insn (I3 can
+ never be). */
+ if (i1 == i2 || i0 == i2 || (i0 && i0 == i1))
+ return 0;
+
/* Only try four-insn combinations when there's high likelihood of
success. Look for simple insns, such as loads of constants or
binary operations involving a constant. */