summaryrefslogtreecommitdiffstats
path: root/llvm/lib
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
commit72d1d5e1937bfe6af8385bd95f50dae292fedbfc (patch)
tree588ae43a3a3724675e9bfdea81f5eb523025ab49 /llvm/lib
parent93f3082118b5ab4dfcb1d7b69e67f017e2ba3158 (diff)
downloadbcm5719-llvm-72d1d5e1937bfe6af8385bd95f50dae292fedbfc.tar.gz
bcm5719-llvm-72d1d5e1937bfe6af8385bd95f50dae292fedbfc.zip
Rework this conditional a bit.
Patch by Sanjoy Das llvm-svn: 138853
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/X86/X86ISelLowering.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp
index 8c3aca14798..0d454149301 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/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.
OpenPOWER on IntegriCloud