Jim Grosbach | 48a91ab | 2013-03-07 05:47:54 +0000 | [diff] [blame] | 1 | ; 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. |
| 5 | define <1 x i64> @test_zext(i32 %a) nounwind { |
Stephen Lin | f799e3f | 2013-07-13 20:38:47 +0000 | [diff] [blame] | 6 | ; CHECK-LABEL: test_zext: |
Jim Grosbach | 48a91ab | 2013-03-07 05:47:54 +0000 | [diff] [blame] | 7 | %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 | |
| 13 | define <1 x i64> @test_sext(i32 %a) nounwind { |
Stephen Lin | f799e3f | 2013-07-13 20:38:47 +0000 | [diff] [blame] | 14 | ; CHECK-LABEL: test_sext: |
Jim Grosbach | 48a91ab | 2013-03-07 05:47:54 +0000 | [diff] [blame] | 15 | %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 | } |