1 // REQUIRES: powerpc-registered-target
2 // RUN: %clang_cc1 -O2 -triple powerpc64-unknown-linux-gnu \
3 // RUN: -emit-llvm %s -o - -target-cpu pwr7 | \
4 // RUN: FileCheck %s --check-prefixes=CHECK64
5 // RUN: %clang_cc1 -O2 -triple powerpc64le-unknown-linux-gnu \
6 // RUN: -emit-llvm %s -o - -target-cpu pwr8 | \
7 // RUN: FileCheck %s --check-prefixes=CHECK64
8 // RUN: not %clang_cc1 -O2 -triple powerpc-unknown-aix \
9 // RUN: -emit-llvm %s -o - -target-cpu pwr7 2>&1 | \
10 // RUN: FileCheck %s -check-prefixes=CHECK32-ERROR
11 // RUN: %clang_cc1 -O2 -triple powerpc64-unknown-aix \
12 // RUN: -emit-llvm %s -o - -target-cpu pwr7 | \
13 // RUN: FileCheck %s --check-prefixes=CHECK64
15 extern long long lla
, llb
;
19 void test_xl_tdw(void) {
20 // CHECK64: void @llvm.ppc.tdw(i64 %0, i64 %1, i32 1)
21 // CHECK32-ERROR: error: this builtin is only available on 64-bit targets
26 // CHECK64: void @llvm.ppc.tdw(i64 %0, i64 %1, i32 13)
27 // CHECK32-ERROR: error: this builtin is only available on 64-bit targets
28 __builtin_ppc_tdw(lla
, llb
, 13);
32 void test_trapd(void) {
33 // CHECK64: void @llvm.ppc.trapd(i64 %conv)
34 // CHECK32-ERROR: error: this builtin is only available on 64-bit targets
35 __builtin_ppc_trapd(da
);
38 void test_xl_trapd(void) {
39 // CHECK64: void @llvm.ppc.trapd(i64 %conv)
40 // CHECK32-ERROR: error: this builtin is only available on 64-bit targets