summaryrefslogtreecommitdiff
path: root/test/CodeGen
diff options
context:
space:
mode:
authorJiangning Liu <jiangning.liu@arm.com>2013-12-30 02:44:35 +0000
committerJiangning Liu <jiangning.liu@arm.com>2013-12-30 02:44:35 +0000
commit90128bee68bc37dc4fe58488485d8517f23a38a4 (patch)
tree2bf7e89869bb5653d06ee09ddc9bfb51146450a0 /test/CodeGen
parentafcdbf7400c28c5b3605c8c3672e127900f4eff0 (diff)
downloadllvm-90128bee68bc37dc4fe58488485d8517f23a38a4.tar.gz
llvm-90128bee68bc37dc4fe58488485d8517f23a38a4.tar.bz2
llvm-90128bee68bc37dc4fe58488485d8517f23a38a4.tar.xz
For AArch64 Neon, simplify scalar dup by lane0 for fp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198194 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen')
-rw-r--r--test/CodeGen/AArch64/neon-scalar-copy.ll21
1 files changed, 19 insertions, 2 deletions
diff --git a/test/CodeGen/AArch64/neon-scalar-copy.ll b/test/CodeGen/AArch64/neon-scalar-copy.ll
index 94ef7d96ac..fadd73484e 100644
--- a/test/CodeGen/AArch64/neon-scalar-copy.ll
+++ b/test/CodeGen/AArch64/neon-scalar-copy.ll
@@ -7,9 +7,18 @@ define float @test_dup_sv2S(<2 x float> %v) {
ret float %tmp1
}
+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
+}
+
define float @test_dup_sv4S(<4 x float> %v) {
- ;CHECK: test_dup_sv4S
- ;CHECK: dup {{s[0-9]+}}, {{v[0-9]+}}.s[0]
+ ;CHECK-LABEL: test_dup_sv4S
+ ;CHECK-NOT: dup {{s[0-9]+}}, {{v[0-9]+}}.s[0]
+ ;CHECK: ret
%tmp1 = extractelement <4 x float> %v, i32 0
ret float %tmp1
}
@@ -29,6 +38,14 @@ define double @test_dup_dv2D(<2 x double> %v) {
ret double %tmp1
}
+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
+}
+
define <1 x i8> @test_vector_dup_bv16B(<16 x i8> %v1) {
;CHECK: test_vector_dup_bv16B
;CHECK: dup {{b[0-9]+}}, {{v[0-9]+}}.b[14]