2017-05-29 13:38:20 +08:00
|
|
|
// RUN: %clang_cc1 -triple thumbv8-linux-gnueabihf -target-cpu cortex-a57 -ffreestanding -disable-O0-optnone -emit-llvm %s -o - | opt -S -mem2reg | FileCheck %s
|
2014-02-19 18:37:13 +08:00
|
|
|
|
|
|
|
#include <arm_neon.h>
|
|
|
|
|
2020-02-04 02:09:39 +08:00
|
|
|
// CHECK-LABEL: define <2 x i32> @test_vcvta_s32_f32(<2 x float> %a) #0 {
|
2018-10-25 01:42:17 +08:00
|
|
|
// CHECK: [[VCVTA_S32_V1_I:%.*]] = call <2 x i32> @llvm.arm.neon.vcvtas.v2i32.v2f32(<2 x float> %a) #3
|
2016-03-10 02:54:42 +08:00
|
|
|
// CHECK: ret <2 x i32> [[VCVTA_S32_V1_I]]
|
2014-02-19 18:37:13 +08:00
|
|
|
int32x2_t test_vcvta_s32_f32(float32x2_t a) {
|
|
|
|
return vcvta_s32_f32(a);
|
|
|
|
}
|
|
|
|
|
2020-02-04 02:09:39 +08:00
|
|
|
// CHECK-LABEL: define <2 x i32> @test_vcvta_u32_f32(<2 x float> %a) #0 {
|
2018-10-25 01:42:17 +08:00
|
|
|
// CHECK: [[VCVTA_U32_V1_I:%.*]] = call <2 x i32> @llvm.arm.neon.vcvtau.v2i32.v2f32(<2 x float> %a) #3
|
2016-03-10 02:54:42 +08:00
|
|
|
// CHECK: ret <2 x i32> [[VCVTA_U32_V1_I]]
|
2014-02-19 18:37:13 +08:00
|
|
|
uint32x2_t test_vcvta_u32_f32(float32x2_t a) {
|
|
|
|
return vcvta_u32_f32(a);
|
|
|
|
}
|
|
|
|
|
2020-02-04 02:09:39 +08:00
|
|
|
// CHECK-LABEL: define <4 x i32> @test_vcvtaq_s32_f32(<4 x float> %a) #1 {
|
2018-10-25 01:42:17 +08:00
|
|
|
// CHECK: [[VCVTAQ_S32_V1_I:%.*]] = call <4 x i32> @llvm.arm.neon.vcvtas.v4i32.v4f32(<4 x float> %a) #3
|
2016-03-10 02:54:42 +08:00
|
|
|
// CHECK: ret <4 x i32> [[VCVTAQ_S32_V1_I]]
|
2014-02-19 18:37:13 +08:00
|
|
|
int32x4_t test_vcvtaq_s32_f32(float32x4_t a) {
|
|
|
|
return vcvtaq_s32_f32(a);
|
|
|
|
}
|
|
|
|
|
2020-02-04 02:09:39 +08:00
|
|
|
// CHECK-LABEL: define <4 x i32> @test_vcvtaq_u32_f32(<4 x float> %a) #1 {
|
2018-10-25 01:42:17 +08:00
|
|
|
// CHECK: [[VCVTAQ_U32_V1_I:%.*]] = call <4 x i32> @llvm.arm.neon.vcvtau.v4i32.v4f32(<4 x float> %a) #3
|
2016-03-10 02:54:42 +08:00
|
|
|
// CHECK: ret <4 x i32> [[VCVTAQ_U32_V1_I]]
|
2014-02-19 18:37:13 +08:00
|
|
|
uint32x4_t test_vcvtaq_u32_f32(float32x4_t a) {
|
|
|
|
return vcvtaq_u32_f32(a);
|
|
|
|
}
|
|
|
|
|
2020-02-04 02:09:39 +08:00
|
|
|
// CHECK-LABEL: define <2 x i32> @test_vcvtn_s32_f32(<2 x float> %a) #0 {
|
2018-10-25 01:42:17 +08:00
|
|
|
// CHECK: [[VCVTN_S32_V1_I:%.*]] = call <2 x i32> @llvm.arm.neon.vcvtns.v2i32.v2f32(<2 x float> %a) #3
|
2016-03-10 02:54:42 +08:00
|
|
|
// CHECK: ret <2 x i32> [[VCVTN_S32_V1_I]]
|
2014-02-19 18:37:13 +08:00
|
|
|
int32x2_t test_vcvtn_s32_f32(float32x2_t a) {
|
|
|
|
return vcvtn_s32_f32(a);
|
|
|
|
}
|
|
|
|
|
2020-02-04 02:09:39 +08:00
|
|
|
// CHECK-LABEL: define <2 x i32> @test_vcvtn_u32_f32(<2 x float> %a) #0 {
|
2018-10-25 01:42:17 +08:00
|
|
|
// CHECK: [[VCVTN_U32_V1_I:%.*]] = call <2 x i32> @llvm.arm.neon.vcvtnu.v2i32.v2f32(<2 x float> %a) #3
|
2016-03-10 02:54:42 +08:00
|
|
|
// CHECK: ret <2 x i32> [[VCVTN_U32_V1_I]]
|
2014-02-19 18:37:13 +08:00
|
|
|
uint32x2_t test_vcvtn_u32_f32(float32x2_t a) {
|
|
|
|
return vcvtn_u32_f32(a);
|
|
|
|
}
|
|
|
|
|
2020-02-04 02:09:39 +08:00
|
|
|
// CHECK-LABEL: define <4 x i32> @test_vcvtnq_s32_f32(<4 x float> %a) #1 {
|
2018-10-25 01:42:17 +08:00
|
|
|
// CHECK: [[VCVTNQ_S32_V1_I:%.*]] = call <4 x i32> @llvm.arm.neon.vcvtns.v4i32.v4f32(<4 x float> %a) #3
|
2016-03-10 02:54:42 +08:00
|
|
|
// CHECK: ret <4 x i32> [[VCVTNQ_S32_V1_I]]
|
2014-02-19 18:37:13 +08:00
|
|
|
int32x4_t test_vcvtnq_s32_f32(float32x4_t a) {
|
|
|
|
return vcvtnq_s32_f32(a);
|
|
|
|
}
|
|
|
|
|
2020-02-04 02:09:39 +08:00
|
|
|
// CHECK-LABEL: define <4 x i32> @test_vcvtnq_u32_f32(<4 x float> %a) #1 {
|
2018-10-25 01:42:17 +08:00
|
|
|
// CHECK: [[VCVTNQ_U32_V1_I:%.*]] = call <4 x i32> @llvm.arm.neon.vcvtnu.v4i32.v4f32(<4 x float> %a) #3
|
2016-03-10 02:54:42 +08:00
|
|
|
// CHECK: ret <4 x i32> [[VCVTNQ_U32_V1_I]]
|
2014-02-19 18:37:13 +08:00
|
|
|
uint32x4_t test_vcvtnq_u32_f32(float32x4_t a) {
|
|
|
|
return vcvtnq_u32_f32(a);
|
|
|
|
}
|
|
|
|
|
2020-02-04 02:09:39 +08:00
|
|
|
// CHECK-LABEL: define <2 x i32> @test_vcvtp_s32_f32(<2 x float> %a) #0 {
|
2018-10-25 01:42:17 +08:00
|
|
|
// CHECK: [[VCVTP_S32_V1_I:%.*]] = call <2 x i32> @llvm.arm.neon.vcvtps.v2i32.v2f32(<2 x float> %a) #3
|
2016-03-10 02:54:42 +08:00
|
|
|
// CHECK: ret <2 x i32> [[VCVTP_S32_V1_I]]
|
2014-02-19 18:37:13 +08:00
|
|
|
int32x2_t test_vcvtp_s32_f32(float32x2_t a) {
|
|
|
|
return vcvtp_s32_f32(a);
|
|
|
|
}
|
|
|
|
|
2020-02-04 02:09:39 +08:00
|
|
|
// CHECK-LABEL: define <2 x i32> @test_vcvtp_u32_f32(<2 x float> %a) #0 {
|
2018-10-25 01:42:17 +08:00
|
|
|
// CHECK: [[VCVTP_U32_V1_I:%.*]] = call <2 x i32> @llvm.arm.neon.vcvtpu.v2i32.v2f32(<2 x float> %a) #3
|
2016-03-10 02:54:42 +08:00
|
|
|
// CHECK: ret <2 x i32> [[VCVTP_U32_V1_I]]
|
2014-02-19 18:37:13 +08:00
|
|
|
uint32x2_t test_vcvtp_u32_f32(float32x2_t a) {
|
|
|
|
return vcvtp_u32_f32(a);
|
|
|
|
}
|
|
|
|
|
2020-02-04 02:09:39 +08:00
|
|
|
// CHECK-LABEL: define <4 x i32> @test_vcvtpq_s32_f32(<4 x float> %a) #1 {
|
2018-10-25 01:42:17 +08:00
|
|
|
// CHECK: [[VCVTPQ_S32_V1_I:%.*]] = call <4 x i32> @llvm.arm.neon.vcvtps.v4i32.v4f32(<4 x float> %a) #3
|
2016-03-10 02:54:42 +08:00
|
|
|
// CHECK: ret <4 x i32> [[VCVTPQ_S32_V1_I]]
|
2014-02-19 18:37:13 +08:00
|
|
|
int32x4_t test_vcvtpq_s32_f32(float32x4_t a) {
|
|
|
|
return vcvtpq_s32_f32(a);
|
|
|
|
}
|
|
|
|
|
2020-02-04 02:09:39 +08:00
|
|
|
// CHECK-LABEL: define <4 x i32> @test_vcvtpq_u32_f32(<4 x float> %a) #1 {
|
2018-10-25 01:42:17 +08:00
|
|
|
// CHECK: [[VCVTPQ_U32_V1_I:%.*]] = call <4 x i32> @llvm.arm.neon.vcvtpu.v4i32.v4f32(<4 x float> %a) #3
|
2016-03-10 02:54:42 +08:00
|
|
|
// CHECK: ret <4 x i32> [[VCVTPQ_U32_V1_I]]
|
2014-02-19 18:37:13 +08:00
|
|
|
uint32x4_t test_vcvtpq_u32_f32(float32x4_t a) {
|
|
|
|
return vcvtpq_u32_f32(a);
|
|
|
|
}
|
|
|
|
|
2020-02-04 02:09:39 +08:00
|
|
|
// CHECK-LABEL: define <2 x i32> @test_vcvtm_s32_f32(<2 x float> %a) #0 {
|
2018-10-25 01:42:17 +08:00
|
|
|
// CHECK: [[VCVTM_S32_V1_I:%.*]] = call <2 x i32> @llvm.arm.neon.vcvtms.v2i32.v2f32(<2 x float> %a) #3
|
2016-03-10 02:54:42 +08:00
|
|
|
// CHECK: ret <2 x i32> [[VCVTM_S32_V1_I]]
|
2014-02-19 18:37:13 +08:00
|
|
|
int32x2_t test_vcvtm_s32_f32(float32x2_t a) {
|
|
|
|
return vcvtm_s32_f32(a);
|
|
|
|
}
|
|
|
|
|
2020-02-04 02:09:39 +08:00
|
|
|
// CHECK-LABEL: define <2 x i32> @test_vcvtm_u32_f32(<2 x float> %a) #0 {
|
2018-10-25 01:42:17 +08:00
|
|
|
// CHECK: [[VCVTM_U32_V1_I:%.*]] = call <2 x i32> @llvm.arm.neon.vcvtmu.v2i32.v2f32(<2 x float> %a) #3
|
2016-03-10 02:54:42 +08:00
|
|
|
// CHECK: ret <2 x i32> [[VCVTM_U32_V1_I]]
|
2014-02-19 18:37:13 +08:00
|
|
|
uint32x2_t test_vcvtm_u32_f32(float32x2_t a) {
|
|
|
|
return vcvtm_u32_f32(a);
|
|
|
|
}
|
|
|
|
|
2020-02-04 02:09:39 +08:00
|
|
|
// CHECK-LABEL: define <4 x i32> @test_vcvtmq_s32_f32(<4 x float> %a) #1 {
|
2018-10-25 01:42:17 +08:00
|
|
|
// CHECK: [[VCVTMQ_S32_V1_I:%.*]] = call <4 x i32> @llvm.arm.neon.vcvtms.v4i32.v4f32(<4 x float> %a) #3
|
2016-03-10 02:54:42 +08:00
|
|
|
// CHECK: ret <4 x i32> [[VCVTMQ_S32_V1_I]]
|
2014-02-19 18:37:13 +08:00
|
|
|
int32x4_t test_vcvtmq_s32_f32(float32x4_t a) {
|
|
|
|
return vcvtmq_s32_f32(a);
|
|
|
|
}
|
|
|
|
|
2020-02-04 02:09:39 +08:00
|
|
|
// CHECK-LABEL: define <4 x i32> @test_vcvtmq_u32_f32(<4 x float> %a) #1 {
|
2018-10-25 01:42:17 +08:00
|
|
|
// CHECK: [[VCVTMQ_U32_V1_I:%.*]] = call <4 x i32> @llvm.arm.neon.vcvtmu.v4i32.v4f32(<4 x float> %a) #3
|
2016-03-10 02:54:42 +08:00
|
|
|
// CHECK: ret <4 x i32> [[VCVTMQ_U32_V1_I]]
|
2014-02-19 18:37:13 +08:00
|
|
|
uint32x4_t test_vcvtmq_u32_f32(float32x4_t a) {
|
|
|
|
return vcvtmq_u32_f32(a);
|
|
|
|
}
|
2018-10-25 01:42:17 +08:00
|
|
|
|
|
|
|
// CHECK: attributes #0 ={{.*}}"min-legal-vector-width"="64"
|
|
|
|
// CHECK: attributes #1 ={{.*}}"min-legal-vector-width"="128"
|