mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-01 15:11:24 +00:00
Thumb-2 has CLZ.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74322 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7ce720b448
commit
24062ac5be
@ -266,7 +266,7 @@ ARMTargetLowering::ARMTargetLowering(TargetMachine &TM)
|
||||
setOperationAction(ISD::ROTL, MVT::i32, Expand);
|
||||
setOperationAction(ISD::CTTZ, MVT::i32, Expand);
|
||||
setOperationAction(ISD::CTPOP, MVT::i32, Expand);
|
||||
if (!Subtarget->hasV5TOps() || Subtarget->isThumb())
|
||||
if (!Subtarget->hasV5TOps() || Subtarget->isThumb1Only())
|
||||
setOperationAction(ISD::CTLZ, MVT::i32, Expand);
|
||||
|
||||
// Only ARMv6 has BSWAP.
|
||||
|
8
test/CodeGen/Thumb2/thumb2-clz.ll
Normal file
8
test/CodeGen/Thumb2/thumb2-clz.ll
Normal file
@ -0,0 +1,8 @@
|
||||
; RUN: llvm-as < %s | llc -march=thumb -mattr=+thumb2,+v7a | grep "clz " | count 1
|
||||
|
||||
define i32 @f1(i32 %a) {
|
||||
%tmp = tail call i32 @llvm.ctlz.i32(i32 %a)
|
||||
ret i32 %tmp
|
||||
}
|
||||
|
||||
declare i32 @llvm.ctlz.i32(i32) nounwind readnone
|
Loading…
Reference in New Issue
Block a user