summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/PowerPC
diff options
context:
space:
mode:
authorHal Finkel <hfinkel@anl.gov>2015-10-28 03:26:45 +0000
committerHal Finkel <hfinkel@anl.gov>2015-10-28 03:26:45 +0000
commitf4052340a4861ad2ffb516d21426b6506950770f (patch)
treec0e5365cac577264918b830aecf171bbcaaadcab /llvm/test/CodeGen/PowerPC
parent3ef1e689c9c72da61d79b5df324d46372e9ea439 (diff)
downloadbcm5719-llvm-f4052340a4861ad2ffb516d21426b6506950770f.tar.gz
bcm5719-llvm-f4052340a4861ad2ffb516d21426b6506950770f.zip
[PowerPC] Replace cntlz[.] with cntlzw[.]
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
Diffstat (limited to 'llvm/test/CodeGen/PowerPC')
-rw-r--r--llvm/test/CodeGen/PowerPC/cttz.ll2
-rw-r--r--llvm/test/CodeGen/PowerPC/long-compare.ll2
-rw-r--r--llvm/test/CodeGen/PowerPC/seteq-0.ll2
3 files changed, 3 insertions, 3 deletions
diff --git a/llvm/test/CodeGen/PowerPC/cttz.ll b/llvm/test/CodeGen/PowerPC/cttz.ll
index 60de982d91a..3757fa3e2f2 100644
--- a/llvm/test/CodeGen/PowerPC/cttz.ll
+++ b/llvm/test/CodeGen/PowerPC/cttz.ll
@@ -6,7 +6,7 @@ declare i32 @llvm.cttz.i32(i32, i1)
define i32 @bar(i32 %x) {
entry:
; CHECK: @bar
-; CHECK: cntlz
+; CHECK: cntlzw
%tmp.1 = call i32 @llvm.cttz.i32( i32 %x, i1 true ) ; <i32> [#uses=1]
ret i32 %tmp.1
}
diff --git a/llvm/test/CodeGen/PowerPC/long-compare.ll b/llvm/test/CodeGen/PowerPC/long-compare.ll
index e53356a5ddf..d596068cbb7 100644
--- a/llvm/test/CodeGen/PowerPC/long-compare.ll
+++ b/llvm/test/CodeGen/PowerPC/long-compare.ll
@@ -1,4 +1,4 @@
-; RUN: llc < %s -march=ppc32 | grep cntlz
+; RUN: llc < %s -march=ppc32 | grep cntlzw
; RUN: llc < %s -march=ppc32 | not grep xori
; RUN: llc < %s -march=ppc32 | not grep "li "
; RUN: llc < %s -march=ppc32 | not grep "mr "
diff --git a/llvm/test/CodeGen/PowerPC/seteq-0.ll b/llvm/test/CodeGen/PowerPC/seteq-0.ll
index 4afb8fee177..b7dd78085eb 100644
--- a/llvm/test/CodeGen/PowerPC/seteq-0.ll
+++ b/llvm/test/CodeGen/PowerPC/seteq-0.ll
@@ -5,7 +5,7 @@ define i32 @eq0(i32 %a) {
%tmp.2 = zext i1 %tmp.1 to i32 ; <i32> [#uses=1]
ret i32 %tmp.2
-; CHECK: cntlz [[REG:r[0-9]+]], r3
+; CHECK: cntlzw [[REG:r[0-9]+]], r3
; CHECK: rlwinm r3, [[REG]], 27, 31, 31
; CHECK: blr
}
OpenPOWER on IntegriCloud