[X86] Use ternary operator to reduce code slightly. NFC

llvm-svn: 266534
This commit is contained in:
Craig Topper 2016-04-16 19:09:32 +00:00
parent fd4b9b02a3
commit 1663e7a472
1 changed files with 3 additions and 8 deletions

View File

@ -478,14 +478,9 @@ X86TargetLowering::X86TargetLowering(const X86TargetMachine &TM,
// VASTART needs to be custom lowered to use the VarArgsFrameIndex // VASTART needs to be custom lowered to use the VarArgsFrameIndex
setOperationAction(ISD::VASTART , MVT::Other, Custom); setOperationAction(ISD::VASTART , MVT::Other, Custom);
setOperationAction(ISD::VAEND , MVT::Other, Expand); setOperationAction(ISD::VAEND , MVT::Other, Expand);
if (Subtarget.is64Bit()) { bool Is64Bit = Subtarget.is64Bit();
setOperationAction(ISD::VAARG , MVT::Other, Custom); setOperationAction(ISD::VAARG, MVT::Other, Is64Bit ? Custom : Expand);
setOperationAction(ISD::VACOPY , MVT::Other, Custom); setOperationAction(ISD::VACOPY, MVT::Other, Is64Bit ? Custom : Expand);
} else {
// TargetInfo::CharPtrBuiltinVaList
setOperationAction(ISD::VAARG , MVT::Other, Expand);
setOperationAction(ISD::VACOPY , MVT::Other, Expand);
}
setOperationAction(ISD::STACKSAVE, MVT::Other, Expand); setOperationAction(ISD::STACKSAVE, MVT::Other, Expand);
setOperationAction(ISD::STACKRESTORE, MVT::Other, Expand); setOperationAction(ISD::STACKRESTORE, MVT::Other, Expand);