From dc362ada5417e1c6b028cbca1af2b372ce023498 Mon Sep 17 00:00:00 2001 From: Uros Bizjak Date: Thu, 2 Mar 2017 19:47:03 +0100 Subject: [PATCH] re PR target/79514 (ICE in curr_insn_transform, at lra-constraints.c:3773) 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 | 13 +++++++---- gcc/config/i386/i386.md | 30 +++++++++++++++++++++++++ gcc/testsuite/ChangeLog | 7 +++++- gcc/testsuite/gcc.target/i386/pr79514.c | 12 ++++++++++ 4 files changed, 57 insertions(+), 5 deletions(-) create mode 100644 gcc/testsuite/gcc.target/i386/pr79514.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4663d438a91..85cfb5235e0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2017-03-02 Uros Bizjak + + PR target/79514 + * config/i386/i386.md (*pushxf_rounded): New insn_and_split pattern. + 2017-03-02 Jakub Jelinek PR rtl-optimization/79780 @@ -2036,7 +2041,7 @@ scalar_stmt_cost and vec_stmt_cost. 2017-02-01 Torvald Riegel - Richard Henderson + Richard Henderson * builtins.c (fold_builtin_atomic_always_lock_free): Make "lock-free" conditional on existance of a fast atomic load. @@ -2337,9 +2342,9 @@ 2017-01-27 Richard Earnshaw 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 diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index f23c2d54cd8..f9f362eb244 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -3015,6 +3015,36 @@ 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"))] diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 3eca2ab2194..43d415018c8 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2017-03-02 Uros Bizjak + + PR target/79514 + * gcc.target/i386/pr79514.c: New test. + 2017-03-02 Jakub Jelinek PR rtl-optimization/79780 @@ -1082,7 +1087,7 @@ 2017-02-02 Aaron Sawdey - * gcc.dg/sms-8.c: Update options for powerpc*-*-*. + * gcc.dg/sms-8.c: Update options for powerpc*-*-*. 2017-02-02 Jan Hubicka diff --git a/gcc/testsuite/gcc.target/i386/pr79514.c b/gcc/testsuite/gcc.target/i386/pr79514.c new file mode 100644 index 00000000000..c5b7bf8ef67 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr79514.c @@ -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); +} -- 2.30.2