diff options
author | Jim Grosbach <grosbach@apple.com> | 2010-05-07 18:34:55 +0000 |
---|---|---|
committer | Jim Grosbach <grosbach@apple.com> | 2010-05-07 18:34:55 +0000 |
commit | 4b77f6a85a206f4a4cd23f8cdf710f2574a5ac42 (patch) | |
tree | 40d0449437df0d5fa5dd2f0483ad1599b6bfe4c9 /lib/Target | |
parent | ed66bf5125ec47a338854d5e8a556f1686fd69bb (diff) | |
download | external_llvm-4b77f6a85a206f4a4cd23f8cdf710f2574a5ac42.zip external_llvm-4b77f6a85a206f4a4cd23f8cdf710f2574a5ac42.tar.gz external_llvm-4b77f6a85a206f4a4cd23f8cdf710f2574a5ac42.tar.bz2 |
Clean up the conditional for handling of sign_extend_inreg based on
whether the extract instructions are available.
rdar://7956878
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103277 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target')
-rw-r--r-- | lib/Target/ARM/ARMISelLowering.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/Target/ARM/ARMISelLowering.cpp b/lib/Target/ARM/ARMISelLowering.cpp index f8c17b8..d8582ec 100644 --- a/lib/Target/ARM/ARMISelLowering.cpp +++ b/lib/Target/ARM/ARMISelLowering.cpp @@ -393,8 +393,11 @@ ARMTargetLowering::ARMTargetLowering(TargetMachine &TM) setOperationAction(ISD::DYNAMIC_STACKALLOC, MVT::i32, Expand); setOperationAction(ISD::MEMBARRIER, MVT::Other, Custom); - if (!Subtarget->hasV6Ops() && (!Subtarget->isThumb2() - || !Subtarget->hasT2ExtractPack())) { + // If the subtarget does not have extract instructions, sign_extend_inreg + // needs to be expanded. Extract is available in ARM mode on v6 and up, + // and on most Thumb2 implementations. + if ((!Subtarget->isThumb() && !Subtarget->hasV6Ops()) + || (Subtarget->isThumb2() && !Subtarget->hasT2ExtractPack())) { setOperationAction(ISD::SIGN_EXTEND_INREG, MVT::i16, Expand); setOperationAction(ISD::SIGN_EXTEND_INREG, MVT::i8, Expand); } |