aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGen/AArch64/dag-numsignbits.ll
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-04-16 16:01:22 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-04-16 16:01:22 +0000
commit71d5a2540a98c81f5bcaeb48805e0e2881f530ef (patch)
tree5343938942df402b49ec7300a1c25a2d4ccd5821 /test/CodeGen/AArch64/dag-numsignbits.ll
parent31bbf64f3a4974a2d6c8b3b27ad2f519caf74057 (diff)
Notes
Diffstat (limited to 'test/CodeGen/AArch64/dag-numsignbits.ll')
-rw-r--r--test/CodeGen/AArch64/dag-numsignbits.ll33
1 files changed, 33 insertions, 0 deletions
diff --git a/test/CodeGen/AArch64/dag-numsignbits.ll b/test/CodeGen/AArch64/dag-numsignbits.ll
new file mode 100644
index 000000000000..217c3df77c9c
--- /dev/null
+++ b/test/CodeGen/AArch64/dag-numsignbits.ll
@@ -0,0 +1,33 @@
+; RUN: llc < %s -mtriple=aarch64-unknown | FileCheck %s
+
+; PR32273
+
+define void @signbits_vXi1(<4 x i16> %a1) {
+; CHECK-LABEL: signbits_vXi1
+; CHECK: cmgt v0.4h, v1.4h, v0.4h
+; CHECK-NEXT: and v0.8b, v0.8b, v2.8b
+; CHECK-NEXT: shl v0.4h, v0.4h, #15
+; CHECK-NEXT: sshr v0.4h, v0.4h, #15
+; CHECK-NEXT: umov w0, v0.h[0]
+; CHECK-NEXT: umov w3, v0.h[3]
+; CHECK-NEXT: mov w1, wzr
+; CHECK-NEXT: mov w2, wzr
+; CHECK-NEXT: b foo
+ %tmp3 = shufflevector <4 x i16> %a1, <4 x i16> undef, <4 x i32> zeroinitializer
+ %tmp5 = add <4 x i16> %tmp3, <i16 18249, i16 6701, i16 -18744, i16 -25086>
+ %tmp6 = icmp slt <4 x i16> %tmp5, <i16 1, i16 1, i16 1, i16 1>
+ %tmp7 = and <4 x i1> %tmp6, <i1 true, i1 false, i1 false, i1 true>
+ %tmp8 = sext <4 x i1> %tmp7 to <4 x i16>
+ %tmp9 = extractelement <4 x i16> %tmp8, i32 0
+ %tmp10 = zext i16 %tmp9 to i32
+ %tmp11 = extractelement <4 x i16> %tmp8, i32 1
+ %tmp12 = zext i16 %tmp11 to i32
+ %tmp13 = extractelement <4 x i16> %tmp8, i32 2
+ %tmp14 = zext i16 %tmp13 to i32
+ %tmp15 = extractelement <4 x i16> %tmp8, i32 3
+ %tmp16 = zext i16 %tmp15 to i32
+ tail call void @foo(i32 %tmp10, i32 %tmp12, i32 %tmp14, i32 %tmp16)
+ ret void
+}
+
+declare void @foo(i32, i32, i32, i32)