summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2016-03-14 22:19:32 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2016-03-14 22:19:32 +0000
commit2b3c633feb649a11c0b4ac46acdff4fad2f021b3 (patch)
tree64d8494726d66090c71e80c4e8420bdc06887ae6
parent026f213783364bd6f4ac0d274bce9a8c95a629ed (diff)
downloadgcc-2b3c633feb649a11c0b4ac46acdff4fad2f021b3.tar.gz
PR middle-end/70219
* lra-constraints.c (delete_move_and_clobber): Change assertion to also allow dregno == 0. * gcc.dg/pr70219.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@234201 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/lra-constraints.c2
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.dg/pr70219.c18
4 files changed, 30 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index b9fba23890a..a5ada00bbc3 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2016-03-14 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/70219
+ * lra-constraints.c (delete_move_and_clobber): Change assertion
+ to also allow dregno == 0.
+
2016-03-14 Richard Henderson <rth@redhat.com>
PR tree-opt/68714
diff --git a/gcc/lra-constraints.c b/gcc/lra-constraints.c
index 171ed657c85..ced9e12b0f1 100644
--- a/gcc/lra-constraints.c
+++ b/gcc/lra-constraints.c
@@ -5868,7 +5868,7 @@ delete_move_and_clobber (rtx_insn *insn, int dregno)
rtx_insn *prev_insn = PREV_INSN (insn);
lra_set_insn_deleted (insn);
- lra_assert (dregno > 0);
+ lra_assert (dregno >= 0);
if (prev_insn != NULL && NONDEBUG_INSN_P (prev_insn)
&& GET_CODE (PATTERN (prev_insn)) == CLOBBER
&& dregno == get_regno (XEXP (PATTERN (prev_insn), 0)))
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index b2fdd0b2383..f5af12b809c 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2016-03-14 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/70219
+ * gcc.dg/pr70219.c: New test.
+
2016-03-14 Bernd Schmidt <bschmidt@redhat.com>
PR target/70083
diff --git a/gcc/testsuite/gcc.dg/pr70219.c b/gcc/testsuite/gcc.dg/pr70219.c
new file mode 100644
index 00000000000..bbdbe67c735
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr70219.c
@@ -0,0 +1,18 @@
+/* PR middle-end/70219 */
+/* { dg-do compile { target int128 } } */
+/* { dg-options "-O1 -w -Wno-psabi" } */
+
+typedef int B __attribute__ ((vector_size (32)));
+typedef int D __attribute__ ((vector_size (32)));
+typedef long E __attribute__ ((vector_size (32)));
+typedef __int128 F;
+typedef __int128 G __attribute__ ((vector_size (32)));
+
+F
+foo (int a, unsigned b, F c, B d, G e, B f, D g, E h, G i)
+{
+ b /= c;
+ e /= (G) ~d;
+ h -= (E){ g[4], e[1], 64, ~f[1] };
+ return b + e[1] + h[0] + h[1] + i[1];
+}