Stephen Hines | c568f1e | 2014-07-21 00:47:37 -0700 | [diff] [blame] | 1 | // RUN: %clang_cc1 -triple thumbv7-windows -fms-compatibility -emit-llvm -o - %s \ |
| 2 | // RUN: | FileCheck %s -check-prefix CHECK-MSVC |
| 3 | // RUN: %clang_cc1 -triple armv7-eabi -emit-llvm %s -o - \ |
| 4 | // RUN: | FileCheck %s -check-prefix CHECK-EABI |
Stephen Hines | 6bcf27b | 2014-05-29 04:14:42 -0700 | [diff] [blame] | 5 | // REQUIRES: arm-registered-target |
| 6 | |
| 7 | void test_yield_intrinsic() { |
| 8 | __yield(); |
| 9 | } |
| 10 | |
Stephen Hines | c568f1e | 2014-07-21 00:47:37 -0700 | [diff] [blame] | 11 | // CHECK-MSVC: call void @llvm.arm.hint(i32 1) |
| 12 | // CHECK-EABI-NOT: call void @llvm.arm.hint(i32 1) |
| 13 | |
| 14 | void wfe() { |
| 15 | __wfe(); |
| 16 | } |
| 17 | |
| 18 | // CHECK-MSVC: call {{.*}} @llvm.arm.hint(i32 2) |
| 19 | // CHECK-EABI-NOT: call {{.*}} @llvm.arm.hint(i32 2) |
| 20 | |
| 21 | void wfi() { |
| 22 | __wfi(); |
| 23 | } |
| 24 | |
| 25 | // CHECK-MSVC: call {{.*}} @llvm.arm.hint(i32 3) |
| 26 | // CHECK-EABI-NOT: call {{.*}} @llvm.arm.hint(i32 3) |
| 27 | |
| 28 | void sev() { |
| 29 | __sev(); |
| 30 | } |
| 31 | |
| 32 | // CHECK-MSVC: call {{.*}} @llvm.arm.hint(i32 4) |
| 33 | // CHECK-EABI-NOT: call {{.*}} @llvm.arm.hint(i32 4) |
| 34 | |
| 35 | void sevl() { |
| 36 | __sevl(); |
| 37 | } |
| 38 | |
| 39 | // CHECK-MSVC: call {{.*}} @llvm.arm.hint(i32 5) |
| 40 | // CHECK-EABI-NOT: call {{.*}} @llvm.arm.hint(i32 5) |
Stephen Hines | 6bcf27b | 2014-05-29 04:14:42 -0700 | [diff] [blame] | 41 | |