summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/Mips
diff options
context:
space:
mode:
authorPetar Jovanovic <petar.jovanovic@imgtec.com>2014-07-30 00:44:03 +0000
committerPetar Jovanovic <petar.jovanovic@imgtec.com>2014-07-30 00:44:03 +0000
commitb7c305f0914f3785efa643f1b68686fb098f3f6e (patch)
treeb2ba02c4edfa8966d05986579b72f472d5d1ab5c /llvm/test/CodeGen/Mips
parent5ad21fa696d213e0de3fb704d661befab126f30a (diff)
downloadbcm5719-llvm-b7c305f0914f3785efa643f1b68686fb098f3f6e.tar.gz
bcm5719-llvm-b7c305f0914f3785efa643f1b68686fb098f3f6e.zip
Add support for scalarizing ctlz_zero_undef
Fix the missing case in ScalarizeVectorResult() that was exposed with libclcore.bc in Android. Differential Revision: http://reviews.llvm.org/D4645 llvm-svn: 214266
Diffstat (limited to 'llvm/test/CodeGen/Mips')
-rw-r--r--llvm/test/CodeGen/Mips/ctlz-v.ll19
1 files changed, 19 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/Mips/ctlz-v.ll b/llvm/test/CodeGen/Mips/ctlz-v.ll
new file mode 100644
index 00000000000..270f404877e
--- /dev/null
+++ b/llvm/test/CodeGen/Mips/ctlz-v.ll
@@ -0,0 +1,19 @@
+; RUN: llc < %s -march=mipsel -mcpu=mips32r2 | FileCheck %s -check-prefix=MIPS32
+; RUN: llc < %s -march=mips64el -mcpu=mips64r2 | FileCheck %s -check-prefix=MIPS64
+
+declare <2 x i32> @llvm.ctlz.v2i32(<2 x i32>, i1)
+
+define <2 x i32> @ctlzv2i32(<2 x i32> %x) {
+entry:
+; MIPS32: clz $2, $4
+; MIPS32: jr $ra
+; MIPS32: clz $3, $5
+
+; MIPS64: clz $2, $4
+; MIPS64: jr $ra
+; MIPS64: clz $3, $5
+
+ %ret = call <2 x i32> @llvm.ctlz.v2i32(<2 x i32> %x, i1 true)
+ ret <2 x i32> %ret
+}
+
OpenPOWER on IntegriCloud