mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-24 12:19:53 +00:00
e60bc4e8b8
cntlz is the old POWER mnemonic. cntlzw is the PowerPC mnemonic. This change fixes an issue when -no-integrated-as: The opcode cntlz is unrecognized by gas Alias the POWER mnemonic cntlz[.] to the PowerPC mnemonic cntlzw[.] This is done for because the POWER cntlz mnemonic has be used by LLVM for a very long time. We need to make sure that assembly programs that are using the cntlz[.] do not break with this change. Change PowerPC tests to reflect the insn change from cntlz to cntlzw. Add assembly test to verify cntlz[.] is encoded correctly. Patch by Tom Rix! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251489 91177308-0d34-0410-b5e6-96231b3b80d8
14 lines
316 B
LLVM
14 lines
316 B
LLVM
; Make sure this testcase does not use ctpop
|
|
; RUN: llc < %s -march=ppc32 -mcpu=g5 | FileCheck %s
|
|
|
|
declare i32 @llvm.cttz.i32(i32, i1)
|
|
|
|
define i32 @bar(i32 %x) {
|
|
entry:
|
|
; CHECK: @bar
|
|
; CHECK: cntlzw
|
|
%tmp.1 = call i32 @llvm.cttz.i32( i32 %x, i1 true ) ; <i32> [#uses=1]
|
|
ret i32 %tmp.1
|
|
}
|
|
|