summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/Thumb2
diff options
context:
space:
mode:
authorJim Grosbach <grosbach@apple.com>2013-03-07 05:47:54 +0000
committerJim Grosbach <grosbach@apple.com>2013-03-07 05:47:54 +0000
commit48a91abc103d6bd80f3d30d7eaec0d03a25c43ac (patch)
treed5fbc197061e874259f5d32eac2931038e05689c /llvm/test/CodeGen/Thumb2
parent66a907a6bd94e19a8a2184d4e1c70d9041345f5a (diff)
downloadbcm5719-llvm-48a91abc103d6bd80f3d30d7eaec0d03a25c43ac.tar.gz
bcm5719-llvm-48a91abc103d6bd80f3d30d7eaec0d03a25c43ac.zip
SDAG: Handle scalarizing an extend of a <1 x iN> vector.
Just scalarize the element and rebuild a vector of the result type from that. rdar://13281568 llvm-svn: 176614
Diffstat (limited to 'llvm/test/CodeGen/Thumb2')
-rw-r--r--llvm/test/CodeGen/Thumb2/2013-03-06-vector-sext-operand-scalarize.ll19
1 files changed, 19 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/Thumb2/2013-03-06-vector-sext-operand-scalarize.ll b/llvm/test/CodeGen/Thumb2/2013-03-06-vector-sext-operand-scalarize.ll
new file mode 100644
index 00000000000..203815fadc9
--- /dev/null
+++ b/llvm/test/CodeGen/Thumb2/2013-03-06-vector-sext-operand-scalarize.ll
@@ -0,0 +1,19 @@
+; RUN: llc < %s -mtriple=thumbv7-apple-darwin | FileCheck %s
+
+; Testing that these don't crash/assert. The loop vectorizer can end up
+; with odd constructs like this. The code actually generated is incidental.
+define <1 x i64> @test_zext(i32 %a) nounwind {
+; CHECK: test_zext:
+ %Cmp = icmp uge i32 %a, 42
+ %vec = insertelement <1 x i1> zeroinitializer, i1 %Cmp, i32 0
+ %Se = zext <1 x i1> %vec to <1 x i64>
+ ret <1 x i64> %Se
+}
+
+define <1 x i64> @test_sext(i32 %a) nounwind {
+; CHECK: test_sext:
+ %Cmp = icmp uge i32 %a, 42
+ %vec = insertelement <1 x i1> zeroinitializer, i1 %Cmp, i32 0
+ %Se = sext <1 x i1> %vec to <1 x i64>
+ ret <1 x i64> %Se
+}
OpenPOWER on IntegriCloud