1*0a6a1f1dSLionel Sambuc // RUN: %clang_cc1 -O1 -triple arm64-apple-ios7 -target-feature +neon -ffreestanding -S -o - -emit-llvm %s | FileCheck %s
2*0a6a1f1dSLionel Sambuc // Test ARM64 vector compare absolute intrinsics
3*0a6a1f1dSLionel Sambuc
4*0a6a1f1dSLionel Sambuc #include <arm_neon.h>
5*0a6a1f1dSLionel Sambuc
test_vcale_f32(float32x2_t a1,float32x2_t a2)6*0a6a1f1dSLionel Sambuc uint32x2_t test_vcale_f32(float32x2_t a1, float32x2_t a2) {
7*0a6a1f1dSLionel Sambuc // CHECK: test_vcale_f32
8*0a6a1f1dSLionel Sambuc return vcale_f32(a1, a2);
9*0a6a1f1dSLionel Sambuc // CHECK: llvm.aarch64.neon.facge.v2i32.v2f32
10*0a6a1f1dSLionel Sambuc // no check for ret here, as there is a bitcast
11*0a6a1f1dSLionel Sambuc }
12*0a6a1f1dSLionel Sambuc
test_vcaleq_f32(float32x4_t a1,float32x4_t a2)13*0a6a1f1dSLionel Sambuc uint32x4_t test_vcaleq_f32(float32x4_t a1, float32x4_t a2) {
14*0a6a1f1dSLionel Sambuc // CHECK: test_vcaleq_f32
15*0a6a1f1dSLionel Sambuc return vcaleq_f32(a1, a2);
16*0a6a1f1dSLionel Sambuc // CHECK: llvm.aarch64.neon.facge.v4i32.v4f32{{.*a2,.*a1}}
17*0a6a1f1dSLionel Sambuc // no check for ret here, as there is a bitcast
18*0a6a1f1dSLionel Sambuc }
19*0a6a1f1dSLionel Sambuc
test_vcalt_f32(float32x2_t a1,float32x2_t a2)20*0a6a1f1dSLionel Sambuc uint32x2_t test_vcalt_f32(float32x2_t a1, float32x2_t a2) {
21*0a6a1f1dSLionel Sambuc // CHECK: test_vcalt_f32
22*0a6a1f1dSLionel Sambuc return vcalt_f32(a1, a2);
23*0a6a1f1dSLionel Sambuc // CHECK: llvm.aarch64.neon.facgt.v2i32.v2f32{{.*a2,.*a1}}
24*0a6a1f1dSLionel Sambuc // no check for ret here, as there is a bitcast
25*0a6a1f1dSLionel Sambuc }
26*0a6a1f1dSLionel Sambuc
test_vcaltq_f32(float32x4_t a1,float32x4_t a2)27*0a6a1f1dSLionel Sambuc uint32x4_t test_vcaltq_f32(float32x4_t a1, float32x4_t a2) {
28*0a6a1f1dSLionel Sambuc // CHECK: test_vcaltq_f32
29*0a6a1f1dSLionel Sambuc return vcaltq_f32(a1, a2);
30*0a6a1f1dSLionel Sambuc // CHECK: llvm.aarch64.neon.facgt.v4i32.v4f32{{.*a2,.*a1}}
31*0a6a1f1dSLionel Sambuc }
32*0a6a1f1dSLionel Sambuc
test_vcagtq_f64(float64x2_t a1,float64x2_t a2)33*0a6a1f1dSLionel Sambuc uint64x2_t test_vcagtq_f64(float64x2_t a1, float64x2_t a2) {
34*0a6a1f1dSLionel Sambuc // CHECK: test_vcagtq_f64
35*0a6a1f1dSLionel Sambuc return vcagtq_f64(a1, a2);
36*0a6a1f1dSLionel Sambuc // CHECK: llvm.aarch64.neon.facgt.v2i64.v2f64{{.*a1,.*a2}}
37*0a6a1f1dSLionel Sambuc // no check for ret here, as there is a bitcast
38*0a6a1f1dSLionel Sambuc }
39*0a6a1f1dSLionel Sambuc
test_vcaltq_f64(float64x2_t a1,float64x2_t a2)40*0a6a1f1dSLionel Sambuc uint64x2_t test_vcaltq_f64(float64x2_t a1, float64x2_t a2) {
41*0a6a1f1dSLionel Sambuc // CHECK: test_vcaltq_f64
42*0a6a1f1dSLionel Sambuc return vcaltq_f64(a1, a2);
43*0a6a1f1dSLionel Sambuc // CHECK: llvm.aarch64.neon.facgt.v2i64.v2f64{{.*a2,.*a1}}
44*0a6a1f1dSLionel Sambuc // no check for ret here, as there is a bitcast
45*0a6a1f1dSLionel Sambuc }
46*0a6a1f1dSLionel Sambuc
test_vcageq_f64(float64x2_t a1,float64x2_t a2)47*0a6a1f1dSLionel Sambuc uint64x2_t test_vcageq_f64(float64x2_t a1, float64x2_t a2) {
48*0a6a1f1dSLionel Sambuc // CHECK: test_vcageq_f64
49*0a6a1f1dSLionel Sambuc return vcageq_f64(a1, a2);
50*0a6a1f1dSLionel Sambuc // CHECK: llvm.aarch64.neon.facge.v2i64.v2f64{{.*a1,.*a2}}
51*0a6a1f1dSLionel Sambuc // no check for ret here, as there is a bitcast
52*0a6a1f1dSLionel Sambuc }
53*0a6a1f1dSLionel Sambuc
test_vcaleq_f64(float64x2_t a1,float64x2_t a2)54*0a6a1f1dSLionel Sambuc uint64x2_t test_vcaleq_f64(float64x2_t a1, float64x2_t a2) {
55*0a6a1f1dSLionel Sambuc // CHECK: test_vcaleq_f64
56*0a6a1f1dSLionel Sambuc return vcaleq_f64(a1, a2);
57*0a6a1f1dSLionel Sambuc // CHECK: llvm.aarch64.neon.facge.v2i64.v2f64{{.*a2,.*a1}}
58*0a6a1f1dSLionel Sambuc // no check for ret here, as there is a bitcast
59*0a6a1f1dSLionel Sambuc }
60