Skip to content

Commit 2863c64

Browse files
authored
[RISCV][NFC] Simplify ISD::SELECT Legality (#142650)
ISD::SELECT is legal by default, so this change to the conditional makes it clearer that XTHeadCondMov and XMipsCMove both leave this operation legal rather than custom expanding it.
1 parent 0d02150 commit 2863c64

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

llvm/lib/Target/RISCV/RISCVISelLowering.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -434,9 +434,7 @@ RISCVTargetLowering::RISCVTargetLowering(const TargetMachine &TM,
434434
setOperationAction(ISD::ABS, MVT::i32, Custom);
435435
}
436436

437-
if (Subtarget.useCCMovInsn())
438-
setOperationAction(ISD::SELECT, XLenVT, Legal);
439-
else if (!Subtarget.hasVendorXTHeadCondMov())
437+
if (!Subtarget.useCCMovInsn() && !Subtarget.hasVendorXTHeadCondMov())
440438
setOperationAction(ISD::SELECT, XLenVT, Custom);
441439

442440
if (Subtarget.hasVendorXqcia() && !Subtarget.is64Bit()) {

0 commit comments

Comments
 (0)