Skip to content

Commit aafa9bf

Browse files
author
mattarde
committed
move code to context
1 parent 1f7b326 commit aafa9bf

File tree

1 file changed

+14
-16
lines changed

1 file changed

+14
-16
lines changed

llvm/lib/Target/X86/X86ISelLowering.cpp

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -217,18 +217,6 @@ X86TargetLowering::X86TargetLowering(const X86TargetMachine &TM,
217217

218218
setTruncStoreAction(MVT::f64, MVT::f32, Expand);
219219

220-
// SETOEQ and SETUNE require checking two conditions.
221-
for (auto VT : {MVT::f32, MVT::f64, MVT::f80}) {
222-
setCondCodeAction(ISD::SETOEQ, VT, Expand);
223-
setCondCodeAction(ISD::SETUNE, VT, Expand);
224-
}
225-
226-
if (Subtarget.hasAVX10_2()) {
227-
for (auto VT : {MVT::f32, MVT::f64}) {
228-
setCondCodeAction(ISD::SETOEQ, VT, Custom);
229-
setCondCodeAction(ISD::SETUNE, VT, Custom);
230-
}
231-
}
232220
// Integer absolute.
233221
if (Subtarget.canUseCMOV()) {
234222
setOperationAction(ISD::ABS , MVT::i16 , Custom);
@@ -2298,10 +2286,8 @@ X86TargetLowering::X86TargetLowering(const X86TargetMachine &TM,
22982286
setOperationAction(ISD::FP_EXTEND, MVT::f32, Legal);
22992287
setOperationAction(ISD::STRICT_FP_EXTEND, MVT::f32, Legal);
23002288

2301-
setCondCodeAction(ISD::SETOEQ, MVT::f16,
2302-
Subtarget.hasAVX10_2() ? Custom : Expand);
2303-
setCondCodeAction(ISD::SETUNE, MVT::f16,
2304-
Subtarget.hasAVX10_2() ? Custom : Expand);
2289+
setCondCodeAction(ISD::SETOEQ, MVT::f16, Expand);
2290+
setCondCodeAction(ISD::SETUNE, MVT::f16, Expand);
23052291

23062292
if (Subtarget.useAVX512Regs()) {
23072293
setGroup(MVT::v32f16);
@@ -2505,6 +2491,18 @@ X86TargetLowering::X86TargetLowering(const X86TargetMachine &TM,
25052491
addRegisterClass(MVT::x86amx, &X86::TILERegClass);
25062492
}
25072493

2494+
// SETOEQ and SETUNE require checking two conditions.
2495+
for (auto VT : {MVT::f32, MVT::f64, MVT::f80}) {
2496+
setCondCodeAction(ISD::SETOEQ, VT, Expand);
2497+
setCondCodeAction(ISD::SETUNE, VT, Expand);
2498+
}
2499+
2500+
if (Subtarget.hasAVX10_2()) {
2501+
for (auto VT : {MVT::f32, MVT::f64}) {
2502+
setCondCodeAction(ISD::SETOEQ, VT, Custom);
2503+
setCondCodeAction(ISD::SETUNE, VT, Custom);
2504+
}
2505+
}
25082506
// We want to custom lower some of our intrinsics.
25092507
setOperationAction(ISD::INTRINSIC_WO_CHAIN, MVT::Other, Custom);
25102508
setOperationAction(ISD::INTRINSIC_W_CHAIN, MVT::Other, Custom);

0 commit comments

Comments
 (0)