summaryrefslogtreecommitdiff
path: root/test/CodeGen/SPARC/ctpop.ll
diff options
context:
space:
mode:
authorEd Schouten <ed@FreeBSD.org>2009-06-02 17:52:33 +0000
committerEd Schouten <ed@FreeBSD.org>2009-06-02 17:52:33 +0000
commit009b1c42aa6266385f2c37e227516b24077e6dd7 (patch)
tree64ba909838c23261cace781ece27d106134ea451 /test/CodeGen/SPARC/ctpop.ll
downloadsrc-test2-009b1c42aa6266385f2c37e227516b24077e6dd7.tar.gz
src-test2-009b1c42aa6266385f2c37e227516b24077e6dd7.zip
Notes
Diffstat (limited to 'test/CodeGen/SPARC/ctpop.ll')
-rw-r--r--test/CodeGen/SPARC/ctpop.ll14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/CodeGen/SPARC/ctpop.ll b/test/CodeGen/SPARC/ctpop.ll
new file mode 100644
index 000000000000..d603baa465de
--- /dev/null
+++ b/test/CodeGen/SPARC/ctpop.ll
@@ -0,0 +1,14 @@
+; RUN: llvm-as < %s | \
+; RUN: llc -march=sparc -mattr=v9 -enable-sparc-v9-insts
+; RUN: llvm-as < %s | llc -march=sparc -mattr=-v9 | \
+; RUN: not grep popc
+; RUN: llvm-as < %s | \
+; RUN: llc -march=sparc -mattr=v9 -enable-sparc-v9-insts | grep popc
+
+declare i32 @llvm.ctpop.i32(i32)
+
+define i32 @test(i32 %X) {
+ %Y = call i32 @llvm.ctpop.i32( i32 %X ) ; <i32> [#uses=1]
+ ret i32 %Y
+}
+