1 ; RUN: llc -mtriple=armv7-none-linux-gnueabi < %s | FileCheck %s
3 @var_v2i8 = global <2 x i8> zeroinitializer
4 @var_v4i8 = global <4 x i8> zeroinitializer
6 @var_v2i16 = global <2 x i16> zeroinitializer
7 @var_v4i16 = global <4 x i16> zeroinitializer
9 @var_v2i32 = global <2 x i32> zeroinitializer
10 @var_v4i32 = global <4 x i32> zeroinitializer
12 @var_v2i64 = global <2 x i64> zeroinitializer
14 define void @test_v2i8tov2i32() {
15 ; CHECK-LABEL: test_v2i8tov2i32:
17 %i8val = load <2 x i8>, <2 x i8>* @var_v2i8
19 %i32val = sext <2 x i8> %i8val to <2 x i32>
20 store <2 x i32> %i32val, <2 x i32>* @var_v2i32
21 ; CHECK: vld1.16 {d[[LOAD:[0-9]+]][0]}, [{{r[0-9]+}}:16]
22 ; CHECK: vmovl.s8 {{q[0-9]+}}, d[[LOAD]]
23 ; CHECK: vmovl.s16 {{q[0-9]+}}, {{d[0-9]+}}
28 define void @test_v2i8tov2i64() {
29 ; CHECK-LABEL: test_v2i8tov2i64:
31 %i8val = load <2 x i8>, <2 x i8>* @var_v2i8
33 %i64val = sext <2 x i8> %i8val to <2 x i64>
34 store <2 x i64> %i64val, <2 x i64>* @var_v2i64
35 ; CHECK: vld1.16 {d{{[0-9]+}}[0]}, [{{r[0-9]+}}:16]
36 ; CHECK: vmovl.s8 {{q[0-9]+}}, d[[LOAD]]
37 ; CHECK: vmovl.s16 {{q[0-9]+}}, {{d[0-9]+}}
38 ; CHECK: vmovl.s32 {{q[0-9]+}}, {{d[0-9]+}}
40 ; %i64val = sext <2 x i8> %i8val to <2 x i64>
41 ; store <2 x i64> %i64val, <2 x i64>* @var_v2i64
46 define void @test_v4i8tov4i16() {
47 ; CHECK-LABEL: test_v4i8tov4i16:
49 %i8val = load <4 x i8>, <4 x i8>* @var_v4i8
51 %i16val = sext <4 x i8> %i8val to <4 x i16>
52 store <4 x i16> %i16val, <4 x i16>* @var_v4i16
53 ; CHECK: vld1.32 {d[[LOAD:[0-9]+]][0]}, [{{r[0-9]+}}:32]
54 ; CHECK: vmovl.s8 {{q[0-9]+}}, d[[LOAD]]
55 ; CHECK-NOT: vmovl.s16
61 define void @test_v4i8tov4i32() {
62 ; CHECK-LABEL: test_v4i8tov4i32:
64 %i8val = load <4 x i8>, <4 x i8>* @var_v4i8
66 %i16val = sext <4 x i8> %i8val to <4 x i32>
67 store <4 x i32> %i16val, <4 x i32>* @var_v4i32
68 ; CHECK: vld1.32 {d[[LOAD:[0-9]+]][0]}, [{{r[0-9]+}}:32]
69 ; CHECK: vmovl.s8 {{q[0-9]+}}, d[[LOAD]]
70 ; CHECK: vmovl.s16 {{q[0-9]+}}, {{d[0-9]+}}
75 define void @test_v2i16tov2i32() {
76 ; CHECK-LABEL: test_v2i16tov2i32:
78 %i16val = load <2 x i16>, <2 x i16>* @var_v2i16
80 %i32val = sext <2 x i16> %i16val to <2 x i32>
81 store <2 x i32> %i32val, <2 x i32>* @var_v2i32
82 ; CHECK: vld1.32 {d[[LOAD:[0-9]+]][0]}, [{{r[0-9]+}}:32]
83 ; CHECK: vmovl.s16 {{q[0-9]+}}, d[[LOAD]]
90 define void @test_v2i16tov2i64() {
91 ; CHECK-LABEL: test_v2i16tov2i64:
93 %i16val = load <2 x i16>, <2 x i16>* @var_v2i16
95 %i64val = sext <2 x i16> %i16val to <2 x i64>
96 store <2 x i64> %i64val, <2 x i64>* @var_v2i64
97 ; CHECK: vld1.32 {d[[LOAD:[0-9]+]][0]}, [{{r[0-9]+}}:32]
98 ; CHECK: vmovl.s16 {{q[0-9]+}}, d[[LOAD]]
99 ; CHECK: vmovl.s32 {{q[0-9]+}}, d[[LOAD]]