[multiple changes]
authorVladimir Makarov <vmakarov@gcc.gnu.org>
Fri, 8 Dec 2017 23:47:44 +0000 (23:47 +0000)
committerVladimir Makarov <vmakarov@gcc.gnu.org>
Fri, 8 Dec 2017 23:47:44 +0000 (23:47 +0000)
2017-12-08  Vladimir Makarov  <vmakarov@redhat.com>

PR rtl-optimization/83317
* lra-constraints.c (process_address_1): Add insn code check.

2017-12-08  Jakub Jelinek  <jakub@redhat.com>

PR rtl-optimization/83317
* gcc.target/i386/pr83317.c: New test.

From-SVN: r255517

gcc/ChangeLog
gcc/lra-constraints.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/pr83317.c [new file with mode: 0644]

index 35c27beeeb5c2c07ad975d84cabbcf5f72150105..973fb15be93e8b475f41f0ee632dcc9ae82174dc 100644 (file)
@@ -1,3 +1,8 @@
+2017-12-08  Vladimir Makarov  <vmakarov@redhat.com>
+
+       PR rtl-optimization/83317
+       * lra-constraints.c (process_address_1): Add insn code check.
+
 2017-12-08  Michael Matz  <matz@suse.de>
 
        Fix PR tree-optimization/83323
index 3758409bb9c520423a286ff18815e93bfe3c0b9b..a6600ef992c8bc426e7032fe48e06e516b5238c1 100644 (file)
@@ -3222,7 +3222,8 @@ process_address_1 (int nop, bool check_only_p,
   /* Do not attempt to decompose arbitrary addresses generated by combine
      for asm operands with loose constraints, e.g 'X'.  */
   else if (MEM_P (op)
-          && !(get_constraint_type (cn) == CT_FIXED_FORM
+          && !(INSN_CODE (curr_insn) < 0
+               && get_constraint_type (cn) == CT_FIXED_FORM
                && constraint_satisfied_p (op, cn)))
     decompose_mem_address (&ad, op);
   else if (GET_CODE (op) == SUBREG
index 79f6d24b8c3b91a1a0a53f9b1dd738ac3f3ddf72..cd6c927138ba0801ea62bbced08341a94210799f 100644 (file)
@@ -1,3 +1,8 @@
+2017-12-08  Jakub Jelinek  <jakub@redhat.com>
+
+       PR rtl-optimization/83317
+       * gcc.target/i386/pr83317.c: New test.
+
 2017-12-08  Jakub Jelinek  <jakub@redhat.com>
 
        PR rtl-optimization/81595
diff --git a/gcc/testsuite/gcc.target/i386/pr83317.c b/gcc/testsuite/gcc.target/i386/pr83317.c
new file mode 100644 (file)
index 0000000..5ae0b8d
--- /dev/null
@@ -0,0 +1,21 @@
+/* PR rtl-optimization/83317 */
+/* { dg-do compile } */
+/* { dg-options "-O1" } */
+/* { dg-additional-options "-fPIC" { target fpic } } */
+/* { dg-additional-options "-msse2 -mfpmath=sse" { target ia32 } } */
+
+struct S { double a; };
+struct S c;
+int d, e;
+void *buf[64];
+extern int setjmp (void **);
+
+void
+foo ()
+{
+  setjmp (buf);
+  struct S g;
+  if (d)
+    g.a = __builtin_copysign (e, d);
+  c = g;
+}