i386: Fix up expander conditions on cbranchbf4 and cstorebf4 [PR107969]
authorJakub Jelinek <jakub@redhat.com>
Tue, 6 Dec 2022 11:16:37 +0000 (12:16 +0100)
committerJakub Jelinek <jakub@redhat.com>
Tue, 6 Dec 2022 11:16:37 +0000 (12:16 +0100)
commitbcf89f05f7b0b1732553e224548f1de55321e437
treef0de4e085754af0da0815484f894fe2d86830bae
parent8872df353884fec6d7ff0e8bf8eee356439ec8d8
i386: Fix up expander conditions on cbranchbf4 and cstorebf4 [PR107969]

With -msoft-float we ICE on __bf16 comparisons, because the
insns we want to use under the hood (cbranchsf4 and cstoresf4)
after performing the fast extensions aren't available.

The following patch copies the conditions from the c*sf4 expanders
to the corresponding c*bf4 expanders.

2022-12-06  Jakub Jelinek  <jakub@redhat.com>

PR target/107969
* config/i386/i386.md (cbranchbf4, cstorebf4): Guard expanders
with the same condition as cbranchsf4 or cstoresf4 expanders.

* gcc.target/i386/pr107969.c: New test.
gcc/config/i386/i386.md
gcc/testsuite/gcc.target/i386/pr107969.c [new file with mode: 0644]