1 ; RUN: llc -mtriple=aarch64-none-linux-gnu -mattr=+neon < %s | FileCheck %s
3 define <1 x i64> @test_zext_v1i32_v1i64(<2 x i32> %v) nounwind readnone {
4 ; CHECK-LABEL: test_zext_v1i32_v1i64:
5 ; CHECK: ushll v0.2d, v0.2s, #0
6 %1 = extractelement <2 x i32> %v, i32 0
7 %2 = insertelement <1 x i32> undef, i32 %1, i32 0
8 %3 = zext <1 x i32> %2 to <1 x i64>
12 define <1 x i32> @test_zext_v1i16_v1i32(<4 x i16> %v) nounwind readnone {
13 ; CHECK-LABEL: test_zext_v1i16_v1i32:
14 ; CHECK: ushll v0.4s, v0.4h, #0
15 %1 = extractelement <4 x i16> %v, i32 0
16 %2 = insertelement <1 x i16> undef, i16 %1, i32 0
17 %3 = zext <1 x i16> %2 to <1 x i32>
21 define <1 x i16> @test_zext_v1i8_v1i16(<8 x i8> %v) nounwind readnone {
22 ; CHECK-LABEL: test_zext_v1i8_v1i16:
23 ; CHECK: ushll v0.8h, v0.8b, #0
24 %1 = extractelement <8 x i8> %v, i32 0
25 %2 = insertelement <1 x i8> undef, i8 %1, i32 0
26 %3 = zext <1 x i8> %2 to <1 x i16>
30 define <1 x i32> @test_zext_v1i8_v1i32(<8 x i8> %v) nounwind readnone {
31 ; CHECK-LABEL: test_zext_v1i8_v1i32:
32 ; CHECK: dup b0, v0.b[0]
33 %1 = extractelement <8 x i8> %v, i32 0
34 %2 = insertelement <1 x i8> undef, i8 %1, i32 0
35 %3 = zext <1 x i8> %2 to <1 x i32>
39 define <1 x i64> @test_zext_v1i16_v1i64(<4 x i16> %v) nounwind readnone {
40 ; CHECK-LABEL: test_zext_v1i16_v1i64:
41 ; CHECK: dup h0, v0.h[0]
42 %1 = extractelement <4 x i16> %v, i32 0
43 %2 = insertelement <1 x i16> undef, i16 %1, i32 0
44 %3 = zext <1 x i16> %2 to <1 x i64>
48 define <1 x i64> @test_zext_v1i8_v1i64(<8 x i8> %v) nounwind readnone {
49 ; CHECK-LABEL: test_zext_v1i8_v1i64:
50 ; CHECK: dup b0, v0.b[0]
51 %1 = extractelement <8 x i8> %v, i32 0
52 %2 = insertelement <1 x i8> undef, i8 %1, i32 0
53 %3 = zext <1 x i8> %2 to <1 x i64>
57 define <1 x i64> @test_sext_v1i32_v1i64(<2 x i32> %v) nounwind readnone {
58 ; CHECK-LABEL: test_sext_v1i32_v1i64:
59 ; CHECK: sshll v0.2d, v0.2s, #0
60 %1 = extractelement <2 x i32> %v, i32 0
61 %2 = insertelement <1 x i32> undef, i32 %1, i32 0
62 %3 = sext <1 x i32> %2 to <1 x i64>
66 define <1 x i32> @test_sext_v1i16_v1i32(<4 x i16> %v) nounwind readnone {
67 ; CHECK-LABEL: test_sext_v1i16_v1i32:
68 ; CHECK: sshll v0.4s, v0.4h, #0
69 %1 = extractelement <4 x i16> %v, i32 0
70 %2 = insertelement <1 x i16> undef, i16 %1, i32 0
71 %3 = sext <1 x i16> %2 to <1 x i32>
75 define <1 x i16> @test_sext_v1i8_v1i16(<8 x i8> %v) nounwind readnone {
76 ; CHECK-LABEL: test_sext_v1i8_v1i16:
77 ; CHECK: sshll v0.8h, v0.8b, #0
78 %1 = extractelement <8 x i8> %v, i32 0
79 %2 = insertelement <1 x i8> undef, i8 %1, i32 0
80 %3 = sext <1 x i8> %2 to <1 x i16>
84 define <1 x i32> @test_sext_v1i8_v1i32(<8 x i8> %v) nounwind readnone {
85 ; CHECK-LABEL: test_sext_v1i8_v1i32:
86 ; CHECK: sshll v0.8h, v0.8b, #0
87 ; CHECK: sshll v0.4s, v0.4h, #0
88 %1 = extractelement <8 x i8> %v, i32 0
89 %2 = insertelement <1 x i8> undef, i8 %1, i32 0
90 %3 = sext <1 x i8> %2 to <1 x i32>
94 define <1 x i64> @test_sext_v1i16_v1i64(<4 x i16> %v) nounwind readnone {
95 ; CHECK-LABEL: test_sext_v1i16_v1i64:
96 ; CHECK: sshll v0.4s, v0.4h, #0
97 ; CHECK: sshll v0.2d, v0.2s, #0
98 %1 = extractelement <4 x i16> %v, i32 0
99 %2 = insertelement <1 x i16> undef, i16 %1, i32 0
100 %3 = sext <1 x i16> %2 to <1 x i64>
104 define <1 x i64> @test_sext_v1i8_v1i64(<8 x i8> %v) nounwind readnone {
105 ; CHECK-LABEL: test_sext_v1i8_v1i64:
106 ; CHECK: sshll v0.8h, v0.8b, #0
107 ; CHECK: sshll v0.4s, v0.4h, #0
108 ; CHECK: sshll v0.2d, v0.2s, #0
109 %1 = extractelement <8 x i8> %v, i32 0
110 %2 = insertelement <1 x i8> undef, i8 %1, i32 0
111 %3 = sext <1 x i8> %2 to <1 x i64>