aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2011-08-31 04:17:21 +0000
committerEric Christopher <echristo@apple.com>2011-08-31 04:17:21 +0000
commitc967ad8c888994bddbfda3dd1a042f204de3ffe1 (patch)
treea473935a3029f82193ffa712af0e89595ec3509c
parentbbbc283d86a911ccf3bdecdc78a7a8f71f31683f (diff)
downloadexternal_llvm-c967ad8c888994bddbfda3dd1a042f204de3ffe1.tar.gz
external_llvm-c967ad8c888994bddbfda3dd1a042f204de3ffe1.tar.bz2
external_llvm-c967ad8c888994bddbfda3dd1a042f204de3ffe1.zip
Rework this conditional a bit.
Patch by Sanjoy Das git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138853 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/X86/X86ISelLowering.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/lib/Target/X86/X86ISelLowering.cpp b/lib/Target/X86/X86ISelLowering.cpp
index 8c3aca1479..0d45414930 100644
--- a/lib/Target/X86/X86ISelLowering.cpp
+++ b/lib/Target/X86/X86ISelLowering.cpp
@@ -521,12 +521,16 @@ X86TargetLowering::X86TargetLowering(X86TargetMachine &TM)
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.