1 // RUN: %clang_cc1 -triple thumbv8-linux-gnueabihf -target-cpu cortex-a57 -ffreestanding -O1 -emit-llvm %s -o - | FileCheck %s 2 3 #include <arm_neon.h> 4 test_vcvta_s32_f32(float32x2_t a)5int32x2_t test_vcvta_s32_f32(float32x2_t a) { 6 // CHECK-LABEL: test_vcvta_s32_f32 7 // CHECK-LABEL: call <2 x i32> @llvm.arm.neon.vcvtas.v2i32.v2f32(<2 x float> %a) 8 return vcvta_s32_f32(a); 9 } 10 test_vcvta_u32_f32(float32x2_t a)11uint32x2_t test_vcvta_u32_f32(float32x2_t a) { 12 // CHECK-LABEL: test_vcvta_u32_f32 13 // CHECK-LABEL: call <2 x i32> @llvm.arm.neon.vcvtau.v2i32.v2f32(<2 x float> %a) 14 return vcvta_u32_f32(a); 15 } 16 test_vcvtaq_s32_f32(float32x4_t a)17int32x4_t test_vcvtaq_s32_f32(float32x4_t a) { 18 // CHECK-LABEL: test_vcvtaq_s32_f32 19 // CHECK-LABEL: call <4 x i32> @llvm.arm.neon.vcvtas.v4i32.v4f32(<4 x float> %a) 20 return vcvtaq_s32_f32(a); 21 } 22 test_vcvtaq_u32_f32(float32x4_t a)23uint32x4_t test_vcvtaq_u32_f32(float32x4_t a) { 24 // CHECK-LABEL: test_vcvtaq_u32_f32 25 // CHECK-LABEL: call <4 x i32> @llvm.arm.neon.vcvtau.v4i32.v4f32(<4 x float> %a) 26 return vcvtaq_u32_f32(a); 27 } 28 test_vcvtn_s32_f32(float32x2_t a)29int32x2_t test_vcvtn_s32_f32(float32x2_t a) { 30 // CHECK-LABEL: test_vcvtn_s32_f32 31 // CHECK-LABEL: call <2 x i32> @llvm.arm.neon.vcvtns.v2i32.v2f32(<2 x float> %a) 32 return vcvtn_s32_f32(a); 33 } 34 test_vcvtn_u32_f32(float32x2_t a)35uint32x2_t test_vcvtn_u32_f32(float32x2_t a) { 36 // CHECK-LABEL: test_vcvtn_u32_f32 37 // CHECK-LABEL: call <2 x i32> @llvm.arm.neon.vcvtnu.v2i32.v2f32(<2 x float> %a) 38 return vcvtn_u32_f32(a); 39 } 40 test_vcvtnq_s32_f32(float32x4_t a)41int32x4_t test_vcvtnq_s32_f32(float32x4_t a) { 42 // CHECK-LABEL: test_vcvtnq_s32_f32 43 // CHECK-LABEL: call <4 x i32> @llvm.arm.neon.vcvtns.v4i32.v4f32(<4 x float> %a) 44 return vcvtnq_s32_f32(a); 45 } 46 test_vcvtnq_u32_f32(float32x4_t a)47uint32x4_t test_vcvtnq_u32_f32(float32x4_t a) { 48 // CHECK-LABEL: test_vcvtnq_u32_f32 49 // CHECK-LABEL: call <4 x i32> @llvm.arm.neon.vcvtnu.v4i32.v4f32(<4 x float> %a) 50 return vcvtnq_u32_f32(a); 51 } 52 test_vcvtp_s32_f32(float32x2_t a)53int32x2_t test_vcvtp_s32_f32(float32x2_t a) { 54 // CHECK-LABEL: test_vcvtp_s32_f32 55 // CHECK-LABEL: call <2 x i32> @llvm.arm.neon.vcvtps.v2i32.v2f32(<2 x float> %a) 56 return vcvtp_s32_f32(a); 57 } 58 test_vcvtp_u32_f32(float32x2_t a)59uint32x2_t test_vcvtp_u32_f32(float32x2_t a) { 60 // CHECK-LABEL: test_vcvtp_u32_f32 61 // CHECK-LABEL: call <2 x i32> @llvm.arm.neon.vcvtpu.v2i32.v2f32(<2 x float> %a) 62 return vcvtp_u32_f32(a); 63 } 64 test_vcvtpq_s32_f32(float32x4_t a)65int32x4_t test_vcvtpq_s32_f32(float32x4_t a) { 66 // CHECK-LABEL: test_vcvtpq_s32_f32 67 // CHECK-LABEL: call <4 x i32> @llvm.arm.neon.vcvtps.v4i32.v4f32(<4 x float> %a) 68 return vcvtpq_s32_f32(a); 69 } 70 test_vcvtpq_u32_f32(float32x4_t a)71uint32x4_t test_vcvtpq_u32_f32(float32x4_t a) { 72 // CHECK-LABEL: test_vcvtpq_u32_f32 73 // CHECK-LABEL: call <4 x i32> @llvm.arm.neon.vcvtpu.v4i32.v4f32(<4 x float> %a) 74 return vcvtpq_u32_f32(a); 75 } 76 test_vcvtm_s32_f32(float32x2_t a)77int32x2_t test_vcvtm_s32_f32(float32x2_t a) { 78 // CHECK-LABEL: test_vcvtm_s32_f32 79 // CHECK-LABEL: call <2 x i32> @llvm.arm.neon.vcvtms.v2i32.v2f32(<2 x float> %a) 80 return vcvtm_s32_f32(a); 81 } 82 test_vcvtm_u32_f32(float32x2_t a)83uint32x2_t test_vcvtm_u32_f32(float32x2_t a) { 84 // CHECK-LABEL: test_vcvtm_u32_f32 85 // CHECK-LABEL: call <2 x i32> @llvm.arm.neon.vcvtmu.v2i32.v2f32(<2 x float> %a) 86 return vcvtm_u32_f32(a); 87 } 88 test_vcvtmq_s32_f32(float32x4_t a)89int32x4_t test_vcvtmq_s32_f32(float32x4_t a) { 90 // CHECK-LABEL: test_vcvtmq_s32_f32 91 // CHECK-LABEL: call <4 x i32> @llvm.arm.neon.vcvtms.v4i32.v4f32(<4 x float> %a) 92 return vcvtmq_s32_f32(a); 93 } 94 test_vcvtmq_u32_f32(float32x4_t a)95uint32x4_t test_vcvtmq_u32_f32(float32x4_t a) { 96 // CHECK-LABEL: test_vcvtmq_u32_f32 97 // CHECK-LABEL: call <4 x i32> @llvm.arm.neon.vcvtmu.v4i32.v4f32(<4 x float> %a) 98 return vcvtmq_u32_f32(a); 99 } 100