[clang][modules] Don't prevent translation of FW_Private includes when explicitly...
[llvm-project.git] / clang / test / CodeGen / PowerPC / builtins-ppc-xlcompat-darn.c
blob8d78272aabc688f95fa8d5c953091d5428d4d692
1 // REQUIRES: powerpc-registered-target
2 // RUN: %clang_cc1 -triple powerpc64-unknown-linux-gnu \
3 // RUN: -emit-llvm %s -o - -target-cpu pwr9 | \
4 // RUN: FileCheck %s --check-prefix=CHECK-64
5 // RUN: %clang_cc1 -triple powerpc64le-unknown-linux-gnu \
6 // RUN: -emit-llvm %s -o - -target-cpu pwr9 | \
7 // RUN: FileCheck %s --check-prefix=CHECK-64
8 // RUN: %clang_cc1 -triple powerpc64-unknown-aix \
9 // RUN: -emit-llvm %s -o - -target-cpu pwr9 | \
10 // RUN: FileCheck %s --check-prefix=CHECK-64
11 // RUN: %clang_cc1 -triple powerpc-unknown-linux-gnu \
12 // RUN: -emit-llvm %s -o - -target-cpu pwr9 | FileCheck %s
13 // RUN: %clang_cc1 -triple powerpcle-unknown-linux-gnu \
14 // RUN: -emit-llvm %s -o - -target-cpu pwr9 | FileCheck %s
15 // RUN: %clang_cc1 -triple powerpc-unknown-aix \
16 // RUN: -emit-llvm %s -o - -target-cpu pwr9 | FileCheck %s
18 // The darn class of builtins are Power 9 and up and only darn_32 works in
19 // 32 bit mode.
21 #ifdef __PPC64__
22 // CHECK-64-LABEL: @testdarn(
23 // CHECK-64: [[TMP0:%.*]] = call i64 @llvm.ppc.darn()
24 // CHECK-64-NEXT: ret i64 [[TMP0]]
26 long long testdarn(void) {
27 return __darn();
30 // CHECK-64-LABEL: @testdarn_raw(
31 // CHECK-64: [[TMP0:%.*]] = call i64 @llvm.ppc.darnraw()
32 // CHECK-64-NEXT: ret i64 [[TMP0]]
34 long long testdarn_raw(void) {
35 return __darn_raw();
37 #endif
39 // CHECK-LABEL: @testdarn_32(
40 // CHECK: [[TMP0:%.*]] = call i32 @llvm.ppc.darn32()
41 // CHECK-NEXT: ret i32 [[TMP0]]
43 int testdarn_32(void) {
44 return __darn_32();