[llvm-commits] [llvm] r138853 - /llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
Eric Christopher
echristo at apple.com
Tue Aug 30 21:17:21 PDT 2011
Author: echristo
Date: Tue Aug 30 23:17:21 2011
New Revision: 138853
URL: http://llvm.org/viewvc/llvm-project?rev=138853&view=rev
Log:
Rework this conditional a bit.
Patch by Sanjoy Das
Modified:
llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=138853&r1=138852&r2=138853&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Tue Aug 30 23:17:21 2011
@@ -521,12 +521,16 @@
setOperationAction(ISD::STACKSAVE, MVT::Other, Expand);
setOperationAction(ISD::STACKRESTORE, MVT::Other, Expand);
- setOperationAction(ISD::DYNAMIC_STACKALLOC,
- (Subtarget->is64Bit() ? MVT::i64 : MVT::i32),
- ((Subtarget->isTargetCOFF()
- && !Subtarget->isTargetEnvMacho()) ||
- EnableSegmentedStacks
- ? Custom : Expand));
+
+ if (Subtarget->isTargetCOFF() && !Subtarget->isTargetEnvMacho())
+ setOperationAction(ISD::DYNAMIC_STACKALLOC, Subtarget->is64Bit() ?
+ MVT::i64 : MVT::i32, Custom);
+ else if (EnableSegmentedStacks)
+ setOperationAction(ISD::DYNAMIC_STACKALLOC, Subtarget->is64Bit() ?
+ MVT::i64 : MVT::i32, Custom);
+ else
+ setOperationAction(ISD::DYNAMIC_STACKALLOC, Subtarget->is64Bit() ?
+ MVT::i64 : MVT::i32, Expand);
if (!UseSoftFloat && X86ScalarSSEf64) {
// f32 and f64 use SSE.
More information about the llvm-commits
mailing list