summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/AArch64/neon-scalar-copy.ll
diff options
context:
space:
mode:
authorNirav Dave <niravd@google.com>2017-08-07 14:07:49 +0000
committerNirav Dave <niravd@google.com>2017-08-07 14:07:49 +0000
commit3d3bde7682eb73d3d520376a8272abab1cb3c064 (patch)
treea2a2361f5d9fde8aaa854b390e3c14cc09dca311 /llvm/test/CodeGen/AArch64/neon-scalar-copy.ll
parentfaace8f1f16503d2167b8c227e5eaab43390f6b5 (diff)
downloadbcm5719-llvm-3d3bde7682eb73d3d520376a8272abab1cb3c064.tar.gz
bcm5719-llvm-3d3bde7682eb73d3d520376a8272abab1cb3c064.zip
[DAG] Extend visitSCALAR_TO_VECTOR optimization to truncated vector.
Relanding after case to insert explicit truncation as necessary. Allow SCALAR_TO_VECTOR of EXTRACT_VECTOR_ELT to reduce to EXTRACT_SUBVECTOR of vector shuffle when output is smaller. Marginally improves vector shuffle computations. Reviewers: efriedma, RKSimon, spatel Subscribers: javed.absar, llvm-commits Differential Revision: https://reviews.llvm.org/D35566 llvm-svn: 310256
Diffstat (limited to 'llvm/test/CodeGen/AArch64/neon-scalar-copy.ll')
-rw-r--r--llvm/test/CodeGen/AArch64/neon-scalar-copy.ll11
1 files changed, 4 insertions, 7 deletions
diff --git a/llvm/test/CodeGen/AArch64/neon-scalar-copy.ll b/llvm/test/CodeGen/AArch64/neon-scalar-copy.ll
index 3f770600ac5..2384e485fd7 100644
--- a/llvm/test/CodeGen/AArch64/neon-scalar-copy.ll
+++ b/llvm/test/CodeGen/AArch64/neon-scalar-copy.ll
@@ -79,8 +79,7 @@ define half @test_dup_hv8H_0(<8 x half> %v) #0 {
define <1 x i8> @test_vector_dup_bv16B(<16 x i8> %v1) #0 {
; CHECK-LABEL: test_vector_dup_bv16B:
- ; CHECK-NEXT: umov [[W:w[0-9]+]], v0.b[14]
- ; CHECK-NEXT: fmov s0, [[W]]
+ ; CHECK-NEXT: dup v0.16b, v0.b[14]
; CHECK-NEXT: ret
%shuffle.i = shufflevector <16 x i8> %v1, <16 x i8> undef, <1 x i32> <i32 14>
ret <1 x i8> %shuffle.i
@@ -96,8 +95,7 @@ define <1 x i8> @test_vector_dup_bv8B(<8 x i8> %v1) #0 {
define <1 x i16> @test_vector_dup_hv8H(<8 x i16> %v1) #0 {
; CHECK-LABEL: test_vector_dup_hv8H:
- ; CHECK-NEXT: umov [[W:w[0-9]+]], v0.h[7]
- ; CHECK-NEXT: fmov s0, [[W]]
+ ; CHECK-NEXT: dup v0.8h, v0.h[7]
; CHECK-NEXT: ret
%shuffle.i = shufflevector <8 x i16> %v1, <8 x i16> undef, <1 x i32> <i32 7>
ret <1 x i16> %shuffle.i
@@ -113,8 +111,7 @@ define <1 x i16> @test_vector_dup_hv4H(<4 x i16> %v1) #0 {
define <1 x i32> @test_vector_dup_sv4S(<4 x i32> %v1) #0 {
; CHECK-LABEL: test_vector_dup_sv4S:
- ; CHECK-NEXT: mov [[W:w[0-9]+]], v0.s[3]
- ; CHECK-NEXT: fmov s0, [[W]]
+ ; CHECK-NEXT: dup v0.4s, v0.s[3]
; CHECK-NEXT: ret
%shuffle = shufflevector <4 x i32> %v1, <4 x i32> undef, <1 x i32> <i32 3>
ret <1 x i32> %shuffle
@@ -138,7 +135,7 @@ define <1 x i64> @test_vector_dup_dv2D(<2 x i64> %v1) #0 {
define <1 x i64> @test_vector_copy_dup_dv2D(<1 x i64> %a, <2 x i64> %c) #0 {
; CHECK-LABEL: test_vector_copy_dup_dv2D:
- ; CHECK-NEXT: {{dup|mov}} {{d[0-9]+}}, {{v[0-9]+}}.d[1]
+ ; CHECK-NEXT: dup v0.2d, v1.d[1]
; CHECK-NEXT: ret
%vget_lane = extractelement <2 x i64> %c, i32 1
%vset_lane = insertelement <1 x i64> undef, i64 %vget_lane, i32 0
OpenPOWER on IntegriCloud