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 | 2a41cad900b99eaf0ae50af831259ab3c1f752f5 (patch) | |
| tree | 85c04dc7a2840cf00ab3fe6c4c1fbc6618bfef3e /llvm/lib/Target | |
| parent | 4423abd73496b38cd78915542145353ae86c0001 (diff) | |
| download | bcm5719-llvm-2a41cad900b99eaf0ae50af831259ab3c1f752f5.tar.gz bcm5719-llvm-2a41cad900b99eaf0ae50af831259ab3c1f752f5.zip | |
Clean up the conditional for handling of sign_extend_inreg based on
whether the extract instructions are available.
rdar://7956878
llvm-svn: 103277
Diffstat (limited to 'llvm/lib/Target')
| -rw-r--r-- | llvm/lib/Target/ARM/ARMISelLowering.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/llvm/lib/Target/ARM/ARMISelLowering.cpp b/llvm/lib/Target/ARM/ARMISelLowering.cpp index f8c17b8ac2d..d8582ecf05f 100644 --- a/llvm/lib/Target/ARM/ARMISelLowering.cpp +++ b/llvm/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); } |

