mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-01 13:11:39 +01:00
91f52b0e31
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! llvm-svn: 251489
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
|
|
}
|
|
|