@@ -218,10 +218,14 @@ X86TargetLowering::X86TargetLowering(const X86TargetMachine &TM,
218218 setTruncStoreAction(MVT::f64, MVT::f32, Expand);
219219
220220 // SETOEQ and SETUNE require checking two conditions.
221- for (auto VT : {MVT::f32, MVT::f64, MVT::f80}) {
222- setCondCodeAction(ISD::SETOEQ, VT, Subtarget.hasAVX10_2_512() ? Custom : Expand);
223- setCondCodeAction(ISD::SETUNE, VT, Subtarget.hasAVX10_2_512() ? Custom : Expand);
221+ for (auto VT : {MVT::f32, MVT::f64}) {
222+ setCondCodeAction(ISD::SETOEQ, VT,
223+ Subtarget.hasAVX10_2() ? Custom : Expand);
224+ setCondCodeAction(ISD::SETUNE, VT,
225+ Subtarget.hasAVX10_2() ? Custom : Expand);
224226 }
227+ setCondCodeAction(ISD::SETOEQ, MVT::f80, Expand);
228+ setCondCodeAction(ISD::SETUNE, MVT::f80, Expand);
225229
226230 // Integer absolute.
227231 if (Subtarget.canUseCMOV()) {
@@ -2292,8 +2296,10 @@ X86TargetLowering::X86TargetLowering(const X86TargetMachine &TM,
22922296 setOperationAction(ISD::FP_EXTEND, MVT::f32, Legal);
22932297 setOperationAction(ISD::STRICT_FP_EXTEND, MVT::f32, Legal);
22942298
2295- setCondCodeAction(ISD::SETOEQ, MVT::f16, Expand);
2296- setCondCodeAction(ISD::SETUNE, MVT::f16, Expand);
2299+ setCondCodeAction(ISD::SETOEQ, MVT::f16,
2300+ Subtarget.hasAVX10_2() ? Custom : Expand);
2301+ setCondCodeAction(ISD::SETUNE, MVT::f16,
2302+ Subtarget.hasAVX10_2() ? Custom : Expand);
22972303
22982304 if (Subtarget.useAVX512Regs()) {
22992305 setGroup(MVT::v32f16);
@@ -24073,12 +24079,11 @@ SDValue X86TargetLowering::LowerSETCC(SDValue Op, SelectionDAG &DAG) const {
2407324079 return IsStrict ? DAG.getMergeValues({Res, Chain}, dl) : Res;
2407424080 }
2407524081
24076- if(Subtarget.hasAVX10_2_512()){
24077- if( CC == ISD::SETOEQ || CC == ISD::SETUNE){
24078- auto NewCC = (CC == ISD:::SETOEQ) ? X86::COND_E : (X86::COND_NE);
24079- return getSETCC(NewCC,
24080- DAG.getNode(X86ISD::UCOMX,
24081- dl, MVT::i32, Op0, Op1), dl, DAG);
24082+ if (Subtarget.hasAVX10_2_512()) {
24083+ if (CC == ISD::SETOEQ || CC == ISD::SETUNE) {
24084+ auto NewCC = (CC == ISD::SETOEQ) ? X86::COND_E : (X86::COND_NE);
24085+ return getSETCC(NewCC, DAG.getNode(X86ISD::UCOMX, dl, MVT::i32, Op0, Op1),
24086+ dl, DAG);
2408224087 }
2408324088 }
2408424089 // Handle floating point.
@@ -49528,14 +49533,6 @@ static SDValue combineCompareEqual(SDNode *N, SelectionDAG &DAG,
4952849533 // FIXME: need symbolic constants for these magic numbers.
4952949534 // See X86ATTInstPrinter.cpp:printSSECC().
4953049535 unsigned x86cc = (cc0 == X86::COND_E) ? 0 : 4;
49531- // VCOMXSS simplifies conditional code sequence into single setcc
49532- // node. Earlier until COMI, it required upto 2 SETCC's to test CC.
49533- if (Subtarget.hasAVX10_2()) {
49534- return getSETCC(
49535- ((cc0 == X86::COND_E) ? X86::COND_E : X86::COND_NE),
49536- DAG.getNode(X86ISD::UCOMX, DL, MVT::i32, CMP00, CMP01), DL,
49537- DAG);
49538- }
4953949536 if (Subtarget.hasAVX512()) {
4954049537 SDValue FSetCC =
4954149538 DAG.getNode(X86ISD::FSETCCM, DL, MVT::v1i1, CMP00, CMP01,
0 commit comments