diff options
author | Jiangning Liu <jiangning.liu@arm.com> | 2013-11-19 01:46:34 +0000 |
---|---|---|
committer | Jiangning Liu <jiangning.liu@arm.com> | 2013-11-19 01:46:34 +0000 |
commit | fe916e20f27fe4b36e3eea10ac227e0a24ccb0bc (patch) | |
tree | 56fc50ec0e6b4fb3a8e47f62a2745f06fdf18a79 | |
parent | 7f8073edc2927a010eb8e39a65364709de9e4bb0 (diff) | |
download | llvm-fe916e20f27fe4b36e3eea10ac227e0a24ccb0bc.tar.gz |
Implement AArch64 SISD intrinsics for vget_high and vget_low.
llvm-svn: 195073
-rw-r--r-- | clang/include/clang/Basic/arm_neon.td | 7 | ||||
-rw-r--r-- | clang/test/CodeGen/aarch64-neon-vget-hilo.c | 176 |
2 files changed, 183 insertions, 0 deletions
diff --git a/clang/include/clang/Basic/arm_neon.td b/clang/include/clang/Basic/arm_neon.td index ccca04e7b6a9..e83978cb130f 100644 --- a/clang/include/clang/Basic/arm_neon.td +++ b/clang/include/clang/Basic/arm_neon.td @@ -979,6 +979,13 @@ def SCALAR_SUB : SInst<"vsub", "sss", "SlSUl">; // Scalar Saturating Sub def SCALAR_QSUB : SInst<"vqsub", "sss", "ScSsSiSlSUcSUsSUiSUl">; +let InstName = "vmov" in { +def VGET_HIGH_A64 : NoTestOpInst<"vget_high", "dk", "csilhfdUcUsUiUlPcPsPl", + OP_HI>; +def VGET_LOW_A64 : NoTestOpInst<"vget_low", "dk", "csilhfdUcUsUiUlPcPsPl", + OP_LO>; +} + //////////////////////////////////////////////////////////////////////////////// // Scalar Shift // Scalar Shift Left diff --git a/clang/test/CodeGen/aarch64-neon-vget-hilo.c b/clang/test/CodeGen/aarch64-neon-vget-hilo.c new file mode 100644 index 000000000000..9edd31a88b00 --- /dev/null +++ b/clang/test/CodeGen/aarch64-neon-vget-hilo.c @@ -0,0 +1,176 @@ +// REQUIRES: aarch64-registered-target +// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +neon \ +// RUN: -ffp-contract=fast -S -O3 -o - %s | FileCheck %s + +// Test new aarch64 intrinsics and types + +#include <arm_neon.h> + +int8x8_t test_vget_high_s8(int8x16_t a) { + // CHECK: test_vget_high_s8 + return vget_high_s8(a); + // CHECK: dup d0, {{v[0-9]+}}.d[1] +} + +int16x4_t test_vget_high_s16(int16x8_t a) { + // CHECK: test_vget_high_s16 + return vget_high_s16(a); + // CHECK: dup d0, {{v[0-9]+}}.d[1] +} + +int32x2_t test_vget_high_s32(int32x4_t a) { + // CHECK: test_vget_high_s32 + return vget_high_s32(a); + // CHECK: dup d0, {{v[0-9]+}}.d[1] +} + +int64x1_t test_vget_high_s64(int64x2_t a) { + // CHECK: test_vget_high_s64 + return vget_high_s64(a); + // CHECK: dup d0, {{v[0-9]+}}.d[1] +} + +uint8x8_t test_vget_high_u8(uint8x16_t a) { + // CHECK: test_vget_high_u8 + return vget_high_u8(a); + // CHECK: dup d0, {{v[0-9]+}}.d[1] +} + +uint16x4_t test_vget_high_u16(uint16x8_t a) { + // CHECK: test_vget_high_u16 + return vget_high_u16(a); + // CHECK: dup d0, {{v[0-9]+}}.d[1] +} + +uint32x2_t test_vget_high_u32(uint32x4_t a) { + // CHECK: test_vget_high_u32 + return vget_high_u32(a); + // CHECK: dup d0, {{v[0-9]+}}.d[1] +} + +uint64x1_t test_vget_high_u64(uint64x2_t a) { + // CHECK: test_vget_high_u64 + return vget_high_u64(a); + // CHECK: dup d0, {{v[0-9]+}}.d[1] +} + +poly64x1_t test_vget_high_p64(poly64x2_t a) { + // CHECK: test_vget_high_p64 + return vget_high_p64(a); + // CHECK: dup d0, {{v[0-9]+}}.d[1] +} + +float16x4_t test_vget_high_f16(float16x8_t a) { + // CHECK: test_vget_high_f16 + return vget_high_f16(a); + // CHECK: dup d0, {{v[0-9]+}}.d[1] +} + +float32x2_t test_vget_high_f32(float32x4_t a) { + // CHECK: test_vget_high_f32 + return vget_high_f32(a); + // CHECK: dup d0, {{v[0-9]+}}.d[1] +} + +poly8x8_t test_vget_high_p8(poly8x16_t a) { + // CHECK: test_vget_high_p8 + return vget_high_p8(a); + // CHECK: dup d0, {{v[0-9]+}}.d[1] +} + +poly16x4_t test_vget_high_p16(poly16x8_t a) { + // CHECK: test_vget_high_p16 + return vget_high_p16(a); + // CHECK: dup d0, {{v[0-9]+}}.d[1] +} + +float64x1_t test_vget_high_f64(float64x2_t a) { + // CHECK: test_vget_high_f64 + return vget_high_f64(a); + // CHECK: dup d0, {{v[0-9]+}}.d[1] +} + +int8x8_t test_vget_low_s8(int8x16_t a) { + // CHECK: test_vget_low_s8 + return vget_low_s8(a); + // CHECK: dup d0, {{v[0-9]+}}.d[0] +} + +int16x4_t test_vget_low_s16(int16x8_t a) { + // CHECK: test_vget_low_s16 + return vget_low_s16(a); + // CHECK: dup d0, {{v[0-9]+}}.d[0] +} + +int32x2_t test_vget_low_s32(int32x4_t a) { + // CHECK: test_vget_low_s32 + return vget_low_s32(a); + // CHECK: dup d0, {{v[0-9]+}}.d[0] +} + +int64x1_t test_vget_low_s64(int64x2_t a) { + // CHECK: test_vget_low_s64 + return vget_low_s64(a); + // CHECK: dup d0, {{v[0-9]+}}.d[0] +} + +uint8x8_t test_vget_low_u8(uint8x16_t a) { + // CHECK: test_vget_low_u8 + return vget_low_u8(a); + // CHECK: dup d0, {{v[0-9]+}}.d[0] +} + +uint16x4_t test_vget_low_u16(uint16x8_t a) { + // CHECK: test_vget_low_u16 + return vget_low_u16(a); + // CHECK: dup d0, {{v[0-9]+}}.d[0] +} + +uint32x2_t test_vget_low_u32(uint32x4_t a) { + // CHECK: test_vget_low_u32 + return vget_low_u32(a); + // CHECK: dup d0, {{v[0-9]+}}.d[0] +} + +uint64x1_t test_vget_low_u64(uint64x2_t a) { + // CHECK: test_vget_low_u64 + return vget_low_u64(a); + // CHECK: dup d0, {{v[0-9]+}}.d[0] +} + +poly64x1_t test_vget_low_p64(poly64x2_t a) { + // CHECK: test_vget_low_p64 + return vget_low_p64(a); + // CHECK: dup d0, {{v[0-9]+}}.d[0] +} + +float16x4_t test_vget_low_f16(float16x8_t a) { + // CHECK: test_vget_low_f16 + return vget_low_f16(a); + // CHECK: dup d0, {{v[0-9]+}}.d[0] +} + +float32x2_t test_vget_low_f32(float32x4_t a) { + // CHECK: test_vget_low_f32 + return vget_low_f32(a); + // CHECK: dup d0, {{v[0-9]+}}.d[0] +} + +poly8x8_t test_vget_low_p8(poly8x16_t a) { + // CHECK: test_vget_low_p8 + return vget_low_p8(a); + // CHECK: dup d0, {{v[0-9]+}}.d[0] +} + +poly16x4_t test_vget_low_p16(poly16x8_t a) { + // CHECK: test_vget_low_p16 + return vget_low_p16(a); + // CHECK: dup d0, {{v[0-9]+}}.d[0] +} + +float64x1_t test_vget_low_f64(float64x2_t a) { + // CHECK: test_vget_low_f64 + return vget_low_f64(a); + // CHECK: dup d0, {{v[0-9]+}}.d[0] +} + |