re PR target/79514 (ICE in curr_insn_transform, at lra-constraints.c:3773)
authorUros Bizjak <uros@gcc.gnu.org>
Thu, 2 Mar 2017 18:47:03 +0000 (19:47 +0100)
committerUros Bizjak <uros@gcc.gnu.org>
Thu, 2 Mar 2017 18:47:03 +0000 (19:47 +0100)
PR target/79514
* config/i386/i386.md (*pushxf_rounded): New insn_and_split pattern.

testsuite/ChangeLog:

PR target/79514
* gcc.target/i386/pr79514.c: New test.

From-SVN: r245844

gcc/ChangeLog
gcc/config/i386/i386.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/pr79514.c [new file with mode: 0644]

index 4663d438a916e1a5d80eee0836200b3d1a101151..85cfb5235e03db4762d7bab1ed0676b9c9585805 100644 (file)
@@ -1,3 +1,8 @@
+2017-03-02  Uros Bizjak  <ubizjak@gmail.com>
+
+       PR target/79514
+       * config/i386/i386.md (*pushxf_rounded): New insn_and_split pattern.
+
 2017-03-02  Jakub Jelinek  <jakub@redhat.com>
 
        PR rtl-optimization/79780
        scalar_stmt_cost and vec_stmt_cost.
 
 2017-02-01  Torvald Riegel  <triegel@redhat.com>
-            Richard Henderson  <rth@redhat.com>
+           Richard Henderson  <rth@redhat.com>
 
        * builtins.c (fold_builtin_atomic_always_lock_free): Make "lock-free"
        conditional on existance of a fast atomic load.
 2017-01-27  Richard Earnshaw  <rearnsha@arm.com>
 
        PR target/79239
-        * arm.c (arm_option_override): Don't call build_target_option_node
-        until after doing all option overrides.
-        (arm_valid_target_attribute_tree): Likewise.
+       * arm.c (arm_option_override): Don't call build_target_option_node
+       until after doing all option overrides.
+       (arm_valid_target_attribute_tree): Likewise.
 
 2017-01-27  Martin Liska  <mliska@suse.cz>
 
index f23c2d54cd831c01d5ac655aadc82393138bb0b6..f9f362eb2445650f54abd2249fc1794564750b4d 100644 (file)
   operands[0] = replace_equiv_address (operands[0], stack_pointer_rtx);
 })
 
+(define_insn_and_split "*pushxf_rounded"
+  [(set (mem:XF
+         (pre_modify:DI
+           (reg:DI SP_REG)
+           (plus:DI (reg:DI SP_REG) (const_int -16))))
+       (match_operand:XF 0 "nonmemory_no_elim_operand" "f,r,*r,C"))]
+  "TARGET_64BIT"
+  "#"
+  "&& 1"
+  [(set (reg:DI SP_REG) (plus:DI (reg:DI SP_REG) (const_int -16)))
+   (set (match_dup 1) (match_dup 0))]
+{
+  rtx pat = PATTERN (curr_insn);
+  operands[1] = SET_DEST (pat);
+
+  /* Preserve memory attributes. */
+  operands[1] = replace_equiv_address (operands[1], stack_pointer_rtx);
+}
+  [(set_attr "type" "multi")
+   (set_attr "unit" "i387,*,*,*")
+   (set (attr "mode")
+       (cond [(eq_attr "alternative" "1,2,3")
+                (const_string "DI")
+             ]
+             (const_string "XF")))
+   (set (attr "preferred_for_size")
+     (cond [(eq_attr "alternative" "1")
+              (symbol_ref "false")]
+           (symbol_ref "true")))])
+
 (define_insn "*pushxf"
   [(set (match_operand:XF 0 "push_operand" "=<,<,<,<")
        (match_operand:XF 1 "general_no_elim_operand" "f,r,*r,oF"))]
index 3eca2ab2194bd2d1ea4f4e5ac90a42675dd7ebb3..43d415018c895286e3c6ca0b0d7fdfff5a6418f5 100644 (file)
@@ -1,3 +1,8 @@
+2017-03-02  Uros Bizjak  <ubizjak@gmail.com>
+
+       PR target/79514
+       * gcc.target/i386/pr79514.c: New test.
+
 2017-03-02  Jakub Jelinek  <jakub@redhat.com>
 
        PR rtl-optimization/79780
 
 2017-02-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
 
-        * gcc.dg/sms-8.c: Update options for powerpc*-*-*.
+       * gcc.dg/sms-8.c: Update options for powerpc*-*-*.
 
 2017-02-02  Jan Hubicka  <hubicka@ucw.cz>
 
diff --git a/gcc/testsuite/gcc.target/i386/pr79514.c b/gcc/testsuite/gcc.target/i386/pr79514.c
new file mode 100644 (file)
index 0000000..c5b7bf8
--- /dev/null
@@ -0,0 +1,12 @@
+/* PR target/79514 */
+/* { dg-do compile } */
+/* { dg-options "-m96bit-long-double" } */
+
+extern void bar (long double);
+
+extern long double x;
+
+void foo (void)
+{
+  bar (x);
+}