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