aboutsummaryrefslogtreecommitdiff
path: root/gcc/combine.cc
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2025-03-19 14:26:22 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2025-03-19 14:26:22 +0100
commit9030c54d3ff983cf07752173737f627a2e458426 (patch)
treee9b082179a3d80e2d9c878e8d1c037012bfd34ab /gcc/combine.cc
parent28a5efd15695250003534abf91af3210e7a88921 (diff)
downloadgcc-9030c54d3ff983cf07752173737f627a2e458426.zip
gcc-9030c54d3ff983cf07752173737f627a2e458426.tar.gz
gcc-9030c54d3ff983cf07752173737f627a2e458426.tar.bz2
i386: Fix up splitters into vptest [PR119357]
The following testcase ICEs, because the splitters into vptest create an invalid instruction. The operands of all the UNSPEC_PTEST using instructions use register_operand and vector_operand predicate, these splitters use vector_operand predicate but create vptest instruction which has the same argument twice, so one of them needs to be in a register. The following patch keeps vector_operand predicate on the splitters but uses force_reg to force it into a REG if it was a MEM, that results in better code generation e.g. on the included testcase, as combine can match those even with MEM. The difference on the testcase is - vpxor %xmm0, %xmm0, %xmm0 - vpcmpeqb (%rdi), %xmm0, %xmm0 - vpmovmskb %xmm0, %eax - cmpl $65535, %eax + vmovdqa (%rdi), %xmm0 + vptest %xmm0, %xmm0 (- for patch which changes the splitters to s/vector_operand/register_operand/ and + for this patch). 2025-03-19 Jakub Jelinek <jakub@redhat.com> PR target/119357 * config/i386/sse.md (pmovmskb 0xffff to ptest splitter, *pmovsk_ptest_<mode>_avx512): Force operands[0] into a REG. * gcc.target/i386/avx512vlbw-pr119357.c: New test.
Diffstat (limited to 'gcc/combine.cc')
0 files changed, 0 insertions, 0 deletions