From 903ca97bc452be391f45e6b9a2f36ac744b6f29c Mon Sep 17 00:00:00 2001 From: Uros Bizjak Date: Mon, 6 Jun 2016 00:55:35 +0200 Subject: [PATCH] re PR target/71389 (ICE on trunk gcc on ivybridge target (df_refs_verify)) PR target/71389 * config/i386/i386.c (ix86_avx256_split_vector_move_misalign): Copy op1 RTX to avoid invalid sharing. (ix86_expand_vector_move_misalign): Ditto. testsuite/ChangeLog: PR target/71389 * g++.dg/pr71389.C: New test. From-SVN: r237111 --- gcc/ChangeLog | 24 ++++++++++++++---------- gcc/config/i386/i386.c | 4 ++-- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/g++.dg/pr71389.C | 23 +++++++++++++++++++++++ 4 files changed, 44 insertions(+), 12 deletions(-) create mode 100644 gcc/testsuite/g++.dg/pr71389.C diff --git a/gcc/ChangeLog b/gcc/ChangeLog index db3a073ea7e..6f7b0808048 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2016-06-06 Uros Bizjak + + PR target/71389 + * config/i386/i386.c (ix86_avx256_split_vector_move_misalign): + Copy op1 RTX to avoid invalid sharing. + (ix86_expand_vector_move_misalign): Ditto. + 2016-06-05 John David Anglin * expr.c (move_by_pieces_d::generate): Mark mode parameter with @@ -121,10 +128,8 @@ caller-saved registers. (type_natural_mode): Don't warn ABI change for MMX in interrupt handler. - (ix86_function_arg_advance): Skip for callee in interrupt - handler. - (ix86_function_arg): Return special arguments in interrupt - handler. + (ix86_function_arg_advance): Skip for callee in interrupt handler. + (ix86_function_arg): Return special arguments in interrupt handler. (ix86_promote_function_mode): Promote pointer to word_mode only for normal functions. (ix86_can_use_return_insn_p): Don't use `ret' instruction in @@ -132,9 +137,8 @@ (ix86_epilogue_uses): New function. (ix86_hard_regno_scratch_ok): Likewise. (ix86_save_reg): Preserve all registers in interrupt handler - after reload. Preserve all registers, except for function - return registers, if there are no caller-saved registers after - reload. + after reload. Preserve all registers, except for function return + registers, if there are no caller-saved registers after reload. (find_drap_reg): Always use callee-saved register if there are no caller-saved registers. (ix86_minimum_incoming_stack_boundary): Return MIN_STACK_BOUNDARY @@ -244,8 +248,8 @@ 2016-06-03 Alan Hayward - * tree-vectorizer.h (vect_get_vec_def_for_operand_1): New - * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): New + * tree-vectorizer.h (vect_get_vec_def_for_operand_1): New. + * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): New. (vect_get_vec_def_for_operand): Split out code. 2016-06-03 Segher Boessenkool @@ -405,7 +409,7 @@ (P9V_BUILTIN_VSRV): Macro expansion to define argument types for new builtin. * doc/extend.texi: Document the new vec_vslv and vec_srv built-in - functions. + functions. 2016-06-01 Uros Bizjak Jocelyn Mayer diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 0873ac749f5..c191eebc09d 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -19552,7 +19552,7 @@ ix86_avx256_split_vector_move_misalign (rtx op0, rtx op1) m = adjust_address (op0, mode, 0); emit_insn (extract (m, op1, const0_rtx)); m = adjust_address (op0, mode, 16); - emit_insn (extract (m, op1, const1_rtx)); + emit_insn (extract (m, copy_rtx (op1), const1_rtx)); } else gcc_unreachable (); @@ -19724,7 +19724,7 @@ ix86_expand_vector_move_misalign (machine_mode mode, rtx operands[]) m = adjust_address (op0, V2SFmode, 0); emit_insn (gen_sse_storelps (m, op1)); m = adjust_address (op0, V2SFmode, 8); - emit_insn (gen_sse_storehps (m, op1)); + emit_insn (gen_sse_storehps (m, copy_rtx (op1))); } } else diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index e1df37bf431..c09354d3203 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2016-06-06 Uros Bizjak + + PR target/71389 + * g++.dg/pr71389.C: New test. + 2016-06-05 Jerry DeLisle PR fortran/71404 diff --git a/gcc/testsuite/g++.dg/pr71389.C b/gcc/testsuite/g++.dg/pr71389.C new file mode 100644 index 00000000000..023abe1755c --- /dev/null +++ b/gcc/testsuite/g++.dg/pr71389.C @@ -0,0 +1,23 @@ +// { dg-do compile { target i?86-*-* x86_64-*-* } } +// { dg-options "-std=c++11 -O3 -march=ivybridge" } + +#include + +extern int le_s6, le_s9, le_s11; +long foo_v14[16][16]; + +void fn1() { + std::array, 16> v13; + for (; le_s6;) + for (int k1 = 2; k1 < 4; k1 = k1 + 1) { + for (int n1 = 0; n1 < le_s9; n1 = 8) { + *foo_v14[6] = 20923310; + for (int i2 = n1; i2 < n1 + 8; i2 = i2 + 1) + v13.at(5).at(i2 + 6 - n1) = 306146921; + } + + for (int l2 = 0; l2 < le_s11; l2 = l2 + 1) + *(l2 + v13.at(5).begin()) = 306146921; + } + v13.at(le_s6 - 4); +} -- 2.30.2