diff options
author | Bill Wendling <isanbard@gmail.com> | 2013-12-03 07:39:04 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2013-12-03 07:39:04 +0000 |
commit | 058803abe524fb34fb09c396e18b49228f266a67 (patch) | |
tree | 6476c85dc9e45382ca9a1e33ba15060c2dc81876 /clang/test | |
parent | 661ce1401f1a806dc985b59e41506adb6083af64 (diff) | |
download | llvm-058803abe524fb34fb09c396e18b49228f266a67.zip llvm-058803abe524fb34fb09c396e18b49228f266a67.tar.gz llvm-058803abe524fb34fb09c396e18b49228f266a67.tar.bz2 |
Merging r196153:
------------------------------------------------------------------------
r196153 | mcrosier | 2013-12-02 13:07:27 -0800 (Mon, 02 Dec 2013) | 2 lines
[AArch64] Implemented vcopy_lane patterns using scalar DUP instruction.
Patch by Ana Pazos!
------------------------------------------------------------------------
llvm-svn: 196232
Diffstat (limited to 'clang/test')
-rw-r--r-- | clang/test/CodeGen/aarch64-neon-copy.c | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/clang/test/CodeGen/aarch64-neon-copy.c b/clang/test/CodeGen/aarch64-neon-copy.c index 7c77b17..6bc6f00 100644 --- a/clang/test/CodeGen/aarch64-neon-copy.c +++ b/clang/test/CodeGen/aarch64-neon-copy.c @@ -1192,3 +1192,56 @@ float64x2_t test_vmovq_n_f64(float64_t v1) { return vmovq_n_f64(v1); // CHECK: dup {{v[0-9]+}}.2d, {{v[0-9]+}}.d[0] } + +// CHECK: test_vcopy_lane_s64 +int64x1_t test_vcopy_lane_s64(int64x1_t a, int64x1_t c) { + return vcopy_lane_s64(a, 0, c, 0); +// CHECK: fmov {{d[0-9]+}}, {{d[0-9]+}} +// CHECK-NOT: dup {{d[0-9]+}}, {{v[0-9]+}}.d[0] +} + +// CHECK: test_vcopy_lane_u64 +uint64x1_t test_vcopy_lane_u64(uint64x1_t a, uint64x1_t c) { + return vcopy_lane_u64(a, 0, c, 0); +// CHECK: fmov {{d[0-9]+}}, {{d[0-9]+}} +// CHECK-NOT: dup {{d[0-9]+}}, {{v[0-9]+}}.d[0] +} + +// CHECK: test_vcopy_lane_f64 +float64x1_t test_vcopy_lane_f64(float64x1_t a, float64x1_t c) { + return vcopy_lane_f64(a, 0, c, 0); +// CHECK: fmov {{d[0-9]+}}, {{d[0-9]+}} +// CHECK-NOT: dup {{d[0-9]+}}, {{v[0-9]+}}.d[0] +} + +// CHECK: test_vcopy_laneq_s64 +int64x1_t test_vcopy_laneq_s64(int64x1_t a, int64x2_t c) { + return vcopy_laneq_s64(a, 0, c, 1); +// CHECK: dup {{d[0-9]+}}, {{v[0-9]+}}.d[1] +} + +// CHECK: test_vcopy_laneq_u64 +uint64x1_t test_vcopy_laneq_u64(uint64x1_t a, uint64x2_t c) { + return vcopy_laneq_u64(a, 0, c, 1); +// CHECK: dup {{d[0-9]+}}, {{v[0-9]+}}.d[1] +} + +// CHECK: test_vcopy_laneq_f64 +float64x1_t test_vcopy_laneq_f64(float64x1_t a, float64x1_t c) { + return vcopy_laneq_f64(a, 0, c, 0); +// CHECK: fmov {{d[0-9]+}}, {{d[0-9]+}} +// CHECK-NOT: dup {{d[0-9]+}}, {{v[0-9]+}}.d[0] +} + +// CHECK: test_vcopy_laneq_p64 +poly64x1_t test_vcopy_laneq_p64(poly64x1_t a, poly64x2_t c) { + return vcopy_laneq_p64(a, 0, c, 1); +// CHECK: dup {{d[0-9]+}}, {{v[0-9]+}}.d[1] +} + +// CHECK: test_vcopyq_laneq_f64 +float64x2_t test_vcopyq_laneq_f64(float64x2_t a, float64x2_t c) { +// CHECK: ins {{v[0-9]+}}.d[1], {{v[0-9]+}}.d[1] + return vcopyq_laneq_f64(a, 1, c, 1); +} + |