]> git.ipfire.org Git - thirdparty/gcc.git/commit
i386: Fix expand_vector_set for VEC_MERGE/VEC_DUPLICATE RTX [PR117116]
authorUros Bizjak <ubizjak@gmail.com>
Tue, 15 Oct 2024 14:51:33 +0000 (16:51 +0200)
committerUros Bizjak <ubizjak@gmail.com>
Tue, 15 Oct 2024 14:52:55 +0000 (16:52 +0200)
commit80d7032067a3a5b76aecd657d9b35b0a8f5a941d
treec1d83bf86051bb822519ad2c1c2c3b5598fbd63e
parent8065982aebe0737300cc036ed30b55868b977b00
i386: Fix expand_vector_set for VEC_MERGE/VEC_DUPLICATE RTX [PR117116]

Middle end can generate SYMBOL_REF RTX as a value "val" in the call
to expand_vector_set, but SYMBOL_REF RTX is not accepted in
<sse2p4_1>_pinsr<ssemodesuffix> insn pattern, generated via
VEC_MERGE/VEC_DUPLICATE RTX path.

Force the value into a register before VEC_MERGE/VEC_DUPLICATE RTX
is generated if it doesn't satisfy nonimmediate_operand predicate.

PR target/117116

gcc/ChangeLog:

* config/i386/i386-expand.cc (expand_vector_set): Force "val"
into a register before VEC_MERGE/VEC_DUPLICATE RTX is generated
if it doesn't satisfy nonimmediate_operand predicate.

gcc/testsuite/ChangeLog:

* gcc.target/i386/pr117116.c: New test.
gcc/config/i386/i386-expand.cc
gcc/testsuite/gcc.target/i386/pr117116.c [new file with mode: 0644]