summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/WebAssembly/integer64.ll
diff options
context:
space:
mode:
authorDan Gohman <dan433584@gmail.com>2015-08-24 16:39:37 +0000
committerDan Gohman <dan433584@gmail.com>2015-08-24 16:39:37 +0000
commit08fc966d3c25cd943d1b07b50fa54ff390e8ee29 (patch)
treea60a072cabc120ae1d271a7faab149c20f677a93 /llvm/test/CodeGen/WebAssembly/integer64.ll
parent27785dd5300825e60d5ff7edf5a2bada85004b58 (diff)
downloadbcm5719-llvm-08fc966d3c25cd943d1b07b50fa54ff390e8ee29.tar.gz
bcm5719-llvm-08fc966d3c25cd943d1b07b50fa54ff390e8ee29.zip
[WebAssembly] Implement the is_zero_undef forms of cttz and ctlz
llvm-svn: 245851
Diffstat (limited to 'llvm/test/CodeGen/WebAssembly/integer64.ll')
-rw-r--r--llvm/test/CodeGen/WebAssembly/integer64.ll18
1 files changed, 18 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/WebAssembly/integer64.ll b/llvm/test/CodeGen/WebAssembly/integer64.ll
index ba483552939..f902bced9d9 100644
--- a/llvm/test/CodeGen/WebAssembly/integer64.ll
+++ b/llvm/test/CodeGen/WebAssembly/integer64.ll
@@ -148,6 +148,15 @@ define i64 @clz64(i64 %x) {
ret i64 %a
}
+; CHECK-LABEL: clz64_zero_undef:
+; CHECK-NEXT: (setlocal @0 (argument 0))
+; CHECK-NEXT: (setlocal @1 (clz @0))
+; CHECK-NEXT: (return @1)
+define i64 @clz64_zero_undef(i64 %x) {
+ %a = call i64 @llvm.ctlz.i64(i64 %x, i1 true)
+ ret i64 %a
+}
+
; CHECK-LABEL: ctz64:
; CHECK-NEXT: (setlocal @0 (argument 0))
; CHECK-NEXT: (setlocal @1 (ctz @0))
@@ -157,6 +166,15 @@ define i64 @ctz64(i64 %x) {
ret i64 %a
}
+; CHECK-LABEL: ctz64_zero_undef:
+; CHECK-NEXT: (setlocal @0 (argument 0))
+; CHECK-NEXT: (setlocal @1 (ctz @0))
+; CHECK-NEXT: (return @1)
+define i64 @ctz64_zero_undef(i64 %x) {
+ %a = call i64 @llvm.cttz.i64(i64 %x, i1 true)
+ ret i64 %a
+}
+
; CHECK-LABEL: popcnt64:
; CHECK-NEXT: (setlocal @0 (argument 0))
; CHECK-NEXT: (setlocal @1 (popcnt @0))
OpenPOWER on IntegriCloud