blob: 974fade64f0b8df2de35c964848ed59f17b68eef [file] [log] [blame]
Jim Grosbach48a91ab2013-03-07 05:47:54 +00001; RUN: llc < %s -mtriple=thumbv7-apple-darwin | FileCheck %s
2
3; Testing that these don't crash/assert. The loop vectorizer can end up
4; with odd constructs like this. The code actually generated is incidental.
5define <1 x i64> @test_zext(i32 %a) nounwind {
Stephen Linf799e3f2013-07-13 20:38:47 +00006; CHECK-LABEL: test_zext:
Jim Grosbach48a91ab2013-03-07 05:47:54 +00007 %Cmp = icmp uge i32 %a, 42
8 %vec = insertelement <1 x i1> zeroinitializer, i1 %Cmp, i32 0
9 %Se = zext <1 x i1> %vec to <1 x i64>
10 ret <1 x i64> %Se
11}
12
13define <1 x i64> @test_sext(i32 %a) nounwind {
Stephen Linf799e3f2013-07-13 20:38:47 +000014; CHECK-LABEL: test_sext:
Jim Grosbach48a91ab2013-03-07 05:47:54 +000015 %Cmp = icmp uge i32 %a, 42
16 %vec = insertelement <1 x i1> zeroinitializer, i1 %Cmp, i32 0
17 %Se = sext <1 x i1> %vec to <1 x i64>
18 ret <1 x i64> %Se
19}