PR82809: register handling in ix86_vector_duplicate_value
commit90b79395dd0f97e314157f0092722bac1df1ec0c
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 3 Nov 2017 09:24:28 +0000 (3 09:24 +0000)
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 3 Nov 2017 09:24:28 +0000 (3 09:24 +0000)
tree709552d36c9010d5bdb45960cf0a95762cf90c40
parente68c23ab2632f524af2cd63f949c6514e510218b
PR82809: register handling in ix86_vector_duplicate_value

When adding the call to gen_vec_duplicate, I failed to notice that
code further down modified the VEC_DUPLICATE in place.  That isn't
safe if gen_vec_duplicate returned a const_vector.

2017-11-02  Richard Sandiford  <richard.sandiford@linaro.org>

gcc/
PR target/82809
* config/i386/i386.c (ix86_vector_duplicate_value): Use
gen_vec_duplicate after forcing the scalar into a register.

gcc/testsuite/
* gcc.dg/pr82809.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@254366 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/config/i386/i386.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr82809.c [new file with mode: 0644]