@@ -219,8 +219,8 @@ X86TargetLowering::X86TargetLowering(const X86TargetMachine &TM,
219219
220220 // SETOEQ and SETUNE require checking two conditions.
221221 for (auto VT : {MVT::f32, MVT::f64, MVT::f80}) {
222- setCondCodeAction(ISD::SETOEQ, VT, Expand);
223- setCondCodeAction(ISD::SETUNE, VT, Expand);
222+ setCondCodeAction(ISD::SETOEQ, VT, Subtarget.hasAVX10_2_512() ? Custom : Expand);
223+ setCondCodeAction(ISD::SETUNE, VT, Subtarget.hasAVX10_2_512() ? Custom : Expand);
224224 }
225225
226226 // Integer absolute.
@@ -1056,11 +1056,6 @@ X86TargetLowering::X86TargetLowering(const X86TargetMachine &TM,
10561056 }
10571057 }
10581058
1059- if(Subtarget.hasAVX10_2_512()){
1060- for (auto FVT : { MVT::f16, MVT::f32, MVT::f64 }) {
1061- setOperationAction(ISD::SETCC, FVT, Custom);
1062- }
1063- }
10641059 // FIXME: In order to prevent SSE instructions being expanded to MMX ones
10651060 // with -msoft-float, disable use of MMX as well.
10661061 if (!Subtarget.useSoftFloat() && Subtarget.hasMMX()) {
@@ -2447,7 +2442,7 @@ X86TargetLowering::X86TargetLowering(const X86TargetMachine &TM,
24472442 }
24482443 }
24492444 }
2450-
2445+
24512446 if (!Subtarget.useSoftFloat() && Subtarget.hasVLX()) {
24522447 setTruncStoreAction(MVT::v4i64, MVT::v4i8, Legal);
24532448 setTruncStoreAction(MVT::v4i64, MVT::v4i16, Legal);
@@ -24078,6 +24073,14 @@ SDValue X86TargetLowering::LowerSETCC(SDValue Op, SelectionDAG &DAG) const {
2407824073 return IsStrict ? DAG.getMergeValues({Res, Chain}, dl) : Res;
2407924074 }
2408024075
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+ }
24083+ }
2408124084 // Handle floating point.
2408224085 X86::CondCode CondCode = TranslateX86CC(CC, dl, /*IsFP*/ true, Op0, Op1, DAG);
2408324086 if (CondCode == X86::COND_INVALID)
0 commit comments