2014-06-18 16:37:28 +08:00
|
|
|
// REQUIRES: aarch64-registered-target
|
2014-04-16 23:33:48 +08:00
|
|
|
// RUN: %clang_cc1 -triple arm64-none-linux-gnu -target-feature +neon \
|
2014-03-29 23:09:45 +08:00
|
|
|
// RUN: -ffp-contract=fast -S -O3 -o - %s | FileCheck %s --check-prefix CHECK-COMMON --check-prefix CHECK-ARM64
|
2013-11-19 09:46:34 +08:00
|
|
|
|
|
|
|
// Test new aarch64 intrinsics and types
|
|
|
|
|
|
|
|
#include <arm_neon.h>
|
|
|
|
|
|
|
|
int8x8_t test_vget_high_s8(int8x16_t a) {
|
2014-03-29 23:09:45 +08:00
|
|
|
// CHECK-COMMON-LABEL: test_vget_high_s8:
|
2013-11-19 09:46:34 +08:00
|
|
|
return vget_high_s8(a);
|
2014-03-29 23:09:45 +08:00
|
|
|
// CHECK-ARM64: ext v0.16b, v0.16b, v0.16b, #8
|
2013-11-19 09:46:34 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
int16x4_t test_vget_high_s16(int16x8_t a) {
|
2014-03-29 23:09:45 +08:00
|
|
|
// CHECK-COMMON-LABEL: test_vget_high_s16:
|
2013-11-19 09:46:34 +08:00
|
|
|
return vget_high_s16(a);
|
2014-03-29 23:09:45 +08:00
|
|
|
// CHECK-ARM64: ext v0.16b, v0.16b, v0.16b, #8
|
2013-11-19 09:46:34 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
int32x2_t test_vget_high_s32(int32x4_t a) {
|
2014-03-29 23:09:45 +08:00
|
|
|
// CHECK-COMMON-LABEL: test_vget_high_s32:
|
2013-11-19 09:46:34 +08:00
|
|
|
return vget_high_s32(a);
|
2014-03-29 23:09:45 +08:00
|
|
|
// CHECK-ARM64: ext v0.16b, v0.16b, v0.16b, #8
|
2013-11-19 09:46:34 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
int64x1_t test_vget_high_s64(int64x2_t a) {
|
2014-03-29 23:09:45 +08:00
|
|
|
// CHECK-COMMON-LABEL: test_vget_high_s64:
|
2013-11-19 09:46:34 +08:00
|
|
|
return vget_high_s64(a);
|
2014-03-29 23:09:45 +08:00
|
|
|
// CHECK-ARM64: ext v0.16b, v0.16b, v0.16b, #8
|
2013-11-19 09:46:34 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
uint8x8_t test_vget_high_u8(uint8x16_t a) {
|
2014-03-29 23:09:45 +08:00
|
|
|
// CHECK-COMMON-LABEL: test_vget_high_u8:
|
2013-11-19 09:46:34 +08:00
|
|
|
return vget_high_u8(a);
|
2014-03-29 23:09:45 +08:00
|
|
|
// CHECK-ARM64: ext v0.16b, v0.16b, v0.16b, #8
|
2013-11-19 09:46:34 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
uint16x4_t test_vget_high_u16(uint16x8_t a) {
|
2014-03-29 23:09:45 +08:00
|
|
|
// CHECK-COMMON-LABEL: test_vget_high_u16:
|
2013-11-19 09:46:34 +08:00
|
|
|
return vget_high_u16(a);
|
2014-03-29 23:09:45 +08:00
|
|
|
// CHECK-ARM64: ext v0.16b, v0.16b, v0.16b, #8
|
2013-11-19 09:46:34 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
uint32x2_t test_vget_high_u32(uint32x4_t a) {
|
2014-03-29 23:09:45 +08:00
|
|
|
// CHECK-COMMON-LABEL: test_vget_high_u32:
|
2013-11-19 09:46:34 +08:00
|
|
|
return vget_high_u32(a);
|
2014-03-29 23:09:45 +08:00
|
|
|
// CHECK-ARM64: ext v0.16b, v0.16b, v0.16b, #8
|
2013-11-19 09:46:34 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
uint64x1_t test_vget_high_u64(uint64x2_t a) {
|
2014-03-29 23:09:45 +08:00
|
|
|
// CHECK-COMMON-LABEL: test_vget_high_u64:
|
2013-11-19 09:46:34 +08:00
|
|
|
return vget_high_u64(a);
|
2014-03-29 23:09:45 +08:00
|
|
|
// CHECK-ARM64: ext v0.16b, v0.16b, v0.16b, #8
|
2013-11-19 09:46:34 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
poly64x1_t test_vget_high_p64(poly64x2_t a) {
|
2014-03-29 23:09:45 +08:00
|
|
|
// CHECK-COMMON-LABEL: test_vget_high_p64:
|
2013-11-19 09:46:34 +08:00
|
|
|
return vget_high_p64(a);
|
2014-03-29 23:09:45 +08:00
|
|
|
// CHECK-ARM64: ext v0.16b, v0.16b, v0.16b, #8
|
2013-11-19 09:46:34 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
float16x4_t test_vget_high_f16(float16x8_t a) {
|
2014-03-29 23:09:45 +08:00
|
|
|
// CHECK-COMMON-LABEL: test_vget_high_f16:
|
2013-11-19 09:46:34 +08:00
|
|
|
return vget_high_f16(a);
|
2014-03-29 23:09:45 +08:00
|
|
|
// CHECK-ARM64: ext v0.16b, v0.16b, v0.16b, #8
|
2013-11-19 09:46:34 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
float32x2_t test_vget_high_f32(float32x4_t a) {
|
2014-03-29 23:09:45 +08:00
|
|
|
// CHECK-COMMON-LABEL: test_vget_high_f32:
|
2013-11-19 09:46:34 +08:00
|
|
|
return vget_high_f32(a);
|
2014-03-29 23:09:45 +08:00
|
|
|
// CHECK-ARM64: ext v0.16b, v0.16b, v0.16b, #8
|
2013-11-19 09:46:34 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
poly8x8_t test_vget_high_p8(poly8x16_t a) {
|
2014-03-29 23:09:45 +08:00
|
|
|
// CHECK-COMMON-LABEL: test_vget_high_p8:
|
2013-11-19 09:46:34 +08:00
|
|
|
return vget_high_p8(a);
|
2014-03-29 23:09:45 +08:00
|
|
|
// CHECK-ARM64: ext v0.16b, v0.16b, v0.16b, #8
|
2013-11-19 09:46:34 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
poly16x4_t test_vget_high_p16(poly16x8_t a) {
|
2014-03-29 23:09:45 +08:00
|
|
|
// CHECK-COMMON-LABEL: test_vget_high_p16
|
2013-11-19 09:46:34 +08:00
|
|
|
return vget_high_p16(a);
|
2014-03-29 23:09:45 +08:00
|
|
|
// CHECK-ARM64: ext v0.16b, v0.16b, v0.16b, #8
|
2013-11-19 09:46:34 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
float64x1_t test_vget_high_f64(float64x2_t a) {
|
2014-03-29 23:09:45 +08:00
|
|
|
// CHECK-COMMON-LABEL: test_vget_high_f64
|
2013-11-19 09:46:34 +08:00
|
|
|
return vget_high_f64(a);
|
2014-03-29 23:09:45 +08:00
|
|
|
// CHECK-ARM64: ext v0.16b, v0.16b, v0.16b, #8
|
2013-11-19 09:46:34 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
int8x8_t test_vget_low_s8(int8x16_t a) {
|
2014-03-29 23:09:45 +08:00
|
|
|
// CHECK-COMMON-LABEL: test_vget_low_s8:
|
2013-11-19 09:46:34 +08:00
|
|
|
return vget_low_s8(a);
|
2014-03-29 23:09:45 +08:00
|
|
|
// CHECK-COMMON-NEXT: ret
|
2013-11-19 09:46:34 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
int16x4_t test_vget_low_s16(int16x8_t a) {
|
2014-03-29 23:09:45 +08:00
|
|
|
// CHECK-COMMON-LABEL: test_vget_low_s16:
|
2013-11-19 09:46:34 +08:00
|
|
|
return vget_low_s16(a);
|
2014-03-29 23:09:45 +08:00
|
|
|
// CHECK-COMMON-NEXT: ret
|
2013-11-19 09:46:34 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
int32x2_t test_vget_low_s32(int32x4_t a) {
|
2014-03-29 23:09:45 +08:00
|
|
|
// CHECK-COMMON-LABEL: test_vget_low_s32:
|
2013-11-19 09:46:34 +08:00
|
|
|
return vget_low_s32(a);
|
2014-03-29 23:09:45 +08:00
|
|
|
// CHECK-COMMON-NEXT: ret
|
2013-11-19 09:46:34 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
int64x1_t test_vget_low_s64(int64x2_t a) {
|
2014-03-29 23:09:45 +08:00
|
|
|
// CHECK-COMMON-LABEL: test_vget_low_s64:
|
2013-11-19 09:46:34 +08:00
|
|
|
return vget_low_s64(a);
|
2014-03-29 23:09:45 +08:00
|
|
|
// CHECK-COMMON-NEXT: ret
|
2013-11-19 09:46:34 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
uint8x8_t test_vget_low_u8(uint8x16_t a) {
|
2014-03-29 23:09:45 +08:00
|
|
|
// CHECK-COMMON-LABEL: test_vget_low_u8:
|
2013-11-19 09:46:34 +08:00
|
|
|
return vget_low_u8(a);
|
2014-03-29 23:09:45 +08:00
|
|
|
// CHECK-COMMON-NEXT: ret
|
2013-11-19 09:46:34 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
uint16x4_t test_vget_low_u16(uint16x8_t a) {
|
2014-03-29 23:09:45 +08:00
|
|
|
// CHECK-COMMON-LABEL: test_vget_low_u16:
|
2013-11-19 09:46:34 +08:00
|
|
|
return vget_low_u16(a);
|
2014-03-29 23:09:45 +08:00
|
|
|
// CHECK-COMMON-NEXT: ret
|
2013-11-19 09:46:34 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
uint32x2_t test_vget_low_u32(uint32x4_t a) {
|
2014-03-29 23:09:45 +08:00
|
|
|
// CHECK-COMMON-LABEL: test_vget_low_u32:
|
2013-11-19 09:46:34 +08:00
|
|
|
return vget_low_u32(a);
|
2014-03-29 23:09:45 +08:00
|
|
|
// CHECK-COMMON-NEXT: ret
|
2013-11-19 09:46:34 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
uint64x1_t test_vget_low_u64(uint64x2_t a) {
|
2014-03-29 23:09:45 +08:00
|
|
|
// CHECK-COMMON-LABEL: test_vget_low_u64:
|
2013-11-19 09:46:34 +08:00
|
|
|
return vget_low_u64(a);
|
2014-03-29 23:09:45 +08:00
|
|
|
// CHECK-COMMON-NEXT: ret
|
2013-11-19 09:46:34 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
poly64x1_t test_vget_low_p64(poly64x2_t a) {
|
2014-03-29 23:09:45 +08:00
|
|
|
// CHECK-COMMON-LABEL: test_vget_low_p64:
|
2013-11-19 09:46:34 +08:00
|
|
|
return vget_low_p64(a);
|
2014-03-29 23:09:45 +08:00
|
|
|
// CHECK-COMMON-NEXT: ret
|
2013-11-19 09:46:34 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
float16x4_t test_vget_low_f16(float16x8_t a) {
|
2014-03-29 23:09:45 +08:00
|
|
|
// CHECK-COMMON-LABEL: test_vget_low_f16:
|
2013-11-19 09:46:34 +08:00
|
|
|
return vget_low_f16(a);
|
2014-03-29 23:09:45 +08:00
|
|
|
// CHECK-COMMON-NEXT: ret
|
2013-11-19 09:46:34 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
float32x2_t test_vget_low_f32(float32x4_t a) {
|
2014-03-29 23:09:45 +08:00
|
|
|
// CHECK-COMMON-LABEL: test_vget_low_f32:
|
2013-11-19 09:46:34 +08:00
|
|
|
return vget_low_f32(a);
|
2014-03-29 23:09:45 +08:00
|
|
|
// CHECK-COMMON-NEXT: ret
|
2013-11-19 09:46:34 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
poly8x8_t test_vget_low_p8(poly8x16_t a) {
|
2014-03-29 23:09:45 +08:00
|
|
|
// CHECK-COMMON-LABEL: test_vget_low_p8:
|
2013-11-19 09:46:34 +08:00
|
|
|
return vget_low_p8(a);
|
2014-03-29 23:09:45 +08:00
|
|
|
// CHECK-COMMON-NEXT: ret
|
2013-11-19 09:46:34 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
poly16x4_t test_vget_low_p16(poly16x8_t a) {
|
2014-03-29 23:09:45 +08:00
|
|
|
// CHECK-COMMON-LABEL: test_vget_low_p16:
|
2013-11-19 09:46:34 +08:00
|
|
|
return vget_low_p16(a);
|
2014-03-29 23:09:45 +08:00
|
|
|
// CHECK-COMMON-NEXT: ret
|
2013-11-19 09:46:34 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
float64x1_t test_vget_low_f64(float64x2_t a) {
|
2014-03-29 23:09:45 +08:00
|
|
|
// CHECK-COMMON-LABEL: test_vget_low_f64:
|
2013-11-19 09:46:34 +08:00
|
|
|
return vget_low_f64(a);
|
2014-03-29 23:09:45 +08:00
|
|
|
// CHECK-COMMON-NEXT: ret
|
2013-11-19 09:46:34 +08:00
|
|
|
}
|
|
|
|
|