blob: 00cc283063b8c6409fde93fc6412f1744482a061 [file] [log] [blame]
James Molloy75f5f9e2014-04-16 15:33:48 +00001// RUN: %clang_cc1 -O1 -triple arm64-apple-ios7 -target-feature +neon -ffreestanding -S -o - -emit-llvm %s | FileCheck %s
Tim Northovera2ee4332014-03-29 15:09:45 +00002// Test ARM64 vector compare absolute intrinsics
3
4#include <arm_neon.h>
5
6uint32x2_t test_vcale_f32(float32x2_t a1, float32x2_t a2) {
7 // CHECK: test_vcale_f32
8 return vcale_f32(a1, a2);
Tim Northover573cbee2014-05-24 12:52:07 +00009 // CHECK: llvm.aarch64.neon.facge.v2i32.v2f32
Tim Northovera2ee4332014-03-29 15:09:45 +000010 // no check for ret here, as there is a bitcast
11}
12
13uint32x4_t test_vcaleq_f32(float32x4_t a1, float32x4_t a2) {
14 // CHECK: test_vcaleq_f32
15 return vcaleq_f32(a1, a2);
Tim Northover573cbee2014-05-24 12:52:07 +000016 // CHECK: llvm.aarch64.neon.facge.v4i32.v4f32{{.*a2,.*a1}}
Tim Northovera2ee4332014-03-29 15:09:45 +000017 // no check for ret here, as there is a bitcast
18}
19
20uint32x2_t test_vcalt_f32(float32x2_t a1, float32x2_t a2) {
21 // CHECK: test_vcalt_f32
22 return vcalt_f32(a1, a2);
Tim Northover573cbee2014-05-24 12:52:07 +000023 // CHECK: llvm.aarch64.neon.facgt.v2i32.v2f32{{.*a2,.*a1}}
Tim Northovera2ee4332014-03-29 15:09:45 +000024 // no check for ret here, as there is a bitcast
25}
26
27uint32x4_t test_vcaltq_f32(float32x4_t a1, float32x4_t a2) {
28 // CHECK: test_vcaltq_f32
29 return vcaltq_f32(a1, a2);
Tim Northover573cbee2014-05-24 12:52:07 +000030 // CHECK: llvm.aarch64.neon.facgt.v4i32.v4f32{{.*a2,.*a1}}
Tim Northovera2ee4332014-03-29 15:09:45 +000031}
32
33uint64x2_t test_vcagtq_f64(float64x2_t a1, float64x2_t a2) {
34 // CHECK: test_vcagtq_f64
35 return vcagtq_f64(a1, a2);
Tim Northover573cbee2014-05-24 12:52:07 +000036 // CHECK: llvm.aarch64.neon.facgt.v2i64.v2f64{{.*a1,.*a2}}
Tim Northovera2ee4332014-03-29 15:09:45 +000037 // no check for ret here, as there is a bitcast
38}
39
40uint64x2_t test_vcaltq_f64(float64x2_t a1, float64x2_t a2) {
41 // CHECK: test_vcaltq_f64
42 return vcaltq_f64(a1, a2);
Tim Northover573cbee2014-05-24 12:52:07 +000043 // CHECK: llvm.aarch64.neon.facgt.v2i64.v2f64{{.*a2,.*a1}}
Tim Northovera2ee4332014-03-29 15:09:45 +000044 // no check for ret here, as there is a bitcast
45}
46
47uint64x2_t test_vcageq_f64(float64x2_t a1, float64x2_t a2) {
48 // CHECK: test_vcageq_f64
49 return vcageq_f64(a1, a2);
Tim Northover573cbee2014-05-24 12:52:07 +000050 // CHECK: llvm.aarch64.neon.facge.v2i64.v2f64{{.*a1,.*a2}}
Tim Northovera2ee4332014-03-29 15:09:45 +000051 // no check for ret here, as there is a bitcast
52}
53
54uint64x2_t test_vcaleq_f64(float64x2_t a1, float64x2_t a2) {
55 // CHECK: test_vcaleq_f64
56 return vcaleq_f64(a1, a2);
Tim Northover573cbee2014-05-24 12:52:07 +000057 // CHECK: llvm.aarch64.neon.facge.v2i64.v2f64{{.*a2,.*a1}}
Tim Northovera2ee4332014-03-29 15:09:45 +000058 // no check for ret here, as there is a bitcast
59}