[llvm] [X86][AVX512] Use comx for compare (PR #113567)
Phoebe Wang via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 24 07:50:59 PDT 2024
================
@@ -218,10 +218,14 @@ X86TargetLowering::X86TargetLowering(const X86TargetMachine &TM,
setTruncStoreAction(MVT::f64, MVT::f32, Expand);
// SETOEQ and SETUNE require checking two conditions.
- for (auto VT : {MVT::f32, MVT::f64, MVT::f80}) {
- setCondCodeAction(ISD::SETOEQ, VT, Expand);
- setCondCodeAction(ISD::SETUNE, VT, Expand);
+ for (auto VT : {MVT::f32, MVT::f64}) {
+ setCondCodeAction(ISD::SETOEQ, VT,
+ Subtarget.hasAVX10_2() ? Custom : Expand);
+ setCondCodeAction(ISD::SETUNE, VT,
+ Subtarget.hasAVX10_2() ? Custom : Expand);
}
+ setCondCodeAction(ISD::SETOEQ, MVT::f80, Expand);
+ setCondCodeAction(ISD::SETUNE, MVT::f80, Expand);
----------------
phoebewang wrote:
You can leave it as is and override later with
```
if (Subtarget.hasAVX10_2()) {
for (auto VT : {MVT::f16, MVT::f32, MVT::f64}) {
...
}
```
https://github.com/llvm/llvm-project/pull/113567
More information about the llvm-commits
mailing list