]> git.ipfire.org Git - thirdparty/gcc.git/commit
i386: Fix up signbit<mode>2 expander [PR112816]
authorJakub Jelinek <jakub@redhat.com>
Mon, 4 Dec 2023 08:00:18 +0000 (09:00 +0100)
committerJakub Jelinek <jakub@redhat.com>
Tue, 5 Dec 2023 16:24:51 +0000 (17:24 +0100)
commit05d8dec0f9f9660b1f437d52252852a2f86d3ac8
tree0e1226141d71fed42aebd762f9d8df55889cfbef
parent5b651cf6bf1903dd3a4a5ce8c2a95d0e76ee0089
i386: Fix up signbit<mode>2 expander [PR112816]

The following testcase ICEs, because the signbit<mode>2 expander uses an
explicit SUBREG in the pattern around match_operand with register_operand
predicate.  If we are unlucky enough that expansion tries to expand it
with some SUBREG as operands[1], we have two nested SUBREGs in the IL,
which is not valid and causes ICE later.

2023-12-04  Jakub Jelinek  <jakub@redhat.com>

PR target/112816
* config/i386/sse.md (signbit<mode>2): Force operands[1] into a REG.

* gcc.target/i386/sse2-pr112816.c: New test.

(cherry picked from commit 994d6dc64435d6b7c50accca9941ee7decd92a22)
gcc/config/i386/sse.md
gcc/testsuite/gcc.target/i386/sse2-pr112816.c [new file with mode: 0644]