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