2013-11-21 08:16:15 +00:00
|
|
|
; RUN: llc -mtriple=aarch64-none-linux-gnu -mattr=+neon < %s | FileCheck %s
|
|
|
|
|
|
|
|
define float @test_dup_sv2S(<2 x float> %v) {
|
|
|
|
;CHECK: test_dup_sv2S
|
2013-12-12 02:19:13 +00:00
|
|
|
;CHECK: dup {{s[0-9]+}}, {{v[0-9]+}}.s[1]
|
2013-11-21 08:16:15 +00:00
|
|
|
%tmp1 = extractelement <2 x float> %v, i32 1
|
|
|
|
ret float %tmp1
|
|
|
|
}
|
|
|
|
|
2013-12-30 02:44:35 +00:00
|
|
|
define float @test_dup_sv2S_0(<2 x float> %v) {
|
|
|
|
;CHECK-LABEL: test_dup_sv2S_0
|
|
|
|
;CHECK-NOT: dup {{s[0-9]+}}, {{v[0-9]+}}.s[0]
|
|
|
|
;CHECK: ret
|
|
|
|
%tmp1 = extractelement <2 x float> %v, i32 0
|
|
|
|
ret float %tmp1
|
|
|
|
}
|
|
|
|
|
2013-11-21 08:16:15 +00:00
|
|
|
define float @test_dup_sv4S(<4 x float> %v) {
|
2013-12-30 02:44:35 +00:00
|
|
|
;CHECK-LABEL: test_dup_sv4S
|
|
|
|
;CHECK-NOT: dup {{s[0-9]+}}, {{v[0-9]+}}.s[0]
|
|
|
|
;CHECK: ret
|
2013-11-21 08:16:15 +00:00
|
|
|
%tmp1 = extractelement <4 x float> %v, i32 0
|
|
|
|
ret float %tmp1
|
|
|
|
}
|
|
|
|
|
|
|
|
define double @test_dup_dvD(<1 x double> %v) {
|
|
|
|
;CHECK: test_dup_dvD
|
2013-12-12 02:19:13 +00:00
|
|
|
;CHECK-NOT: dup {{d[0-9]+}}, {{v[0-9]+}}.d[0]
|
2013-11-21 08:16:15 +00:00
|
|
|
;CHECK: ret
|
|
|
|
%tmp1 = extractelement <1 x double> %v, i32 0
|
|
|
|
ret double %tmp1
|
|
|
|
}
|
|
|
|
|
|
|
|
define double @test_dup_dv2D(<2 x double> %v) {
|
|
|
|
;CHECK: test_dup_dv2D
|
2013-12-12 02:19:13 +00:00
|
|
|
;CHECK: dup {{d[0-9]+}}, {{v[0-9]+}}.d[1]
|
2013-11-21 08:16:15 +00:00
|
|
|
%tmp1 = extractelement <2 x double> %v, i32 1
|
|
|
|
ret double %tmp1
|
|
|
|
}
|
|
|
|
|
2013-12-30 02:44:35 +00:00
|
|
|
define double @test_dup_dv2D_0(<2 x double> %v) {
|
|
|
|
;CHECK: test_dup_dv2D_0
|
|
|
|
;CHECK-NOT: dup {{d[0-9]+}}, {{v[0-9]+}}.d[0]
|
|
|
|
;CHECK: ret
|
|
|
|
%tmp1 = extractelement <2 x double> %v, i32 1
|
|
|
|
ret double %tmp1
|
|
|
|
}
|
|
|
|
|
2013-11-21 08:16:15 +00:00
|
|
|
define <1 x i8> @test_vector_dup_bv16B(<16 x i8> %v1) {
|
|
|
|
;CHECK: test_vector_dup_bv16B
|
2013-12-12 02:19:13 +00:00
|
|
|
;CHECK: dup {{b[0-9]+}}, {{v[0-9]+}}.b[14]
|
2013-11-21 08:16:15 +00:00
|
|
|
%shuffle.i = shufflevector <16 x i8> %v1, <16 x i8> undef, <1 x i32> <i32 14>
|
|
|
|
ret <1 x i8> %shuffle.i
|
|
|
|
}
|
|
|
|
|
|
|
|
define <1 x i8> @test_vector_dup_bv8B(<8 x i8> %v1) {
|
|
|
|
;CHECK: test_vector_dup_bv8B
|
2013-12-12 02:19:13 +00:00
|
|
|
;CHECK: dup {{b[0-9]+}}, {{v[0-9]+}}.b[7]
|
2013-11-21 08:16:15 +00:00
|
|
|
%shuffle.i = shufflevector <8 x i8> %v1, <8 x i8> undef, <1 x i32> <i32 7>
|
|
|
|
ret <1 x i8> %shuffle.i
|
|
|
|
}
|
|
|
|
|
|
|
|
define <1 x i16> @test_vector_dup_hv8H(<8 x i16> %v1) {
|
|
|
|
;CHECK: test_vector_dup_hv8H
|
2013-12-12 02:19:13 +00:00
|
|
|
;CHECK: dup {{h[0-9]+}}, {{v[0-9]+}}.h[7]
|
2013-11-21 08:16:15 +00:00
|
|
|
%shuffle.i = shufflevector <8 x i16> %v1, <8 x i16> undef, <1 x i32> <i32 7>
|
|
|
|
ret <1 x i16> %shuffle.i
|
|
|
|
}
|
|
|
|
|
|
|
|
define <1 x i16> @test_vector_dup_hv4H(<4 x i16> %v1) {
|
|
|
|
;CHECK: test_vector_dup_hv4H
|
2013-12-12 02:19:13 +00:00
|
|
|
;CHECK: dup {{h[0-9]+}}, {{v[0-9]+}}.h[3]
|
2013-11-21 08:16:15 +00:00
|
|
|
%shuffle.i = shufflevector <4 x i16> %v1, <4 x i16> undef, <1 x i32> <i32 3>
|
|
|
|
ret <1 x i16> %shuffle.i
|
|
|
|
}
|
|
|
|
|
|
|
|
define <1 x i32> @test_vector_dup_sv4S(<4 x i32> %v1) {
|
|
|
|
;CHECK: test_vector_dup_sv4S
|
2013-12-12 02:19:13 +00:00
|
|
|
;CHECK: dup {{s[0-9]+}}, {{v[0-9]+}}.s[3]
|
2013-11-21 08:16:15 +00:00
|
|
|
%shuffle = shufflevector <4 x i32> %v1, <4 x i32> undef, <1 x i32> <i32 3>
|
|
|
|
ret <1 x i32> %shuffle
|
|
|
|
}
|
|
|
|
|
|
|
|
define <1 x i32> @test_vector_dup_sv2S(<2 x i32> %v1) {
|
|
|
|
;CHECK: test_vector_dup_sv2S
|
2013-12-12 02:19:13 +00:00
|
|
|
;CHECK: dup {{s[0-9]+}}, {{v[0-9]+}}.s[1]
|
2013-11-21 08:16:15 +00:00
|
|
|
%shuffle = shufflevector <2 x i32> %v1, <2 x i32> undef, <1 x i32> <i32 1>
|
|
|
|
ret <1 x i32> %shuffle
|
|
|
|
}
|
|
|
|
|
|
|
|
define <1 x i64> @test_vector_dup_dv2D(<2 x i64> %v1) {
|
|
|
|
;CHECK: test_vector_dup_dv2D
|
2013-12-12 02:19:13 +00:00
|
|
|
;CHECK: dup {{d[0-9]+}}, {{v[0-9]+}}.d[1]
|
2013-11-21 08:16:15 +00:00
|
|
|
%shuffle.i = shufflevector <2 x i64> %v1, <2 x i64> undef, <1 x i32> <i32 1>
|
|
|
|
ret <1 x i64> %shuffle.i
|
|
|
|
}
|
|
|
|
|
2013-12-02 21:05:16 +00:00
|
|
|
define <1 x i64> @test_vector_copy_dup_dv2D(<1 x i64> %a, <2 x i64> %c) {
|
|
|
|
;CHECK: test_vector_copy_dup_dv2D
|
2013-12-12 02:19:13 +00:00
|
|
|
;CHECK: dup {{d[0-9]+}}, {{v[0-9]+}}.d[1]
|
2013-12-02 21:05:16 +00:00
|
|
|
%vget_lane = extractelement <2 x i64> %c, i32 1
|
|
|
|
%vset_lane = insertelement <1 x i64> undef, i64 %vget_lane, i32 0
|
|
|
|
ret <1 x i64> %vset_lane
|
|
|
|
}
|
|
|
|
|