brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.4 KiB · 55796df Raw
43 lines · c
1// REQUIRES: powerpc-registered-target2// RUN: %clang_cc1 -O2 -triple powerpc64-unknown-linux-gnu \3// RUN:   -emit-llvm %s -o - -target-cpu pwr7 | \4// RUN:  FileCheck %s --check-prefixes=CHECK645// RUN: %clang_cc1 -O2 -triple powerpc64le-unknown-linux-gnu \6// RUN:   -emit-llvm %s -o - -target-cpu pwr8 | \7// RUN:  FileCheck %s --check-prefixes=CHECK648// 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-ERROR11// RUN: %clang_cc1 -O2 -triple powerpc64-unknown-aix \12// RUN:   -emit-llvm %s -o - -target-cpu pwr7 | \13// RUN:  FileCheck %s --check-prefixes=CHECK6414 15extern long long lla, llb;16extern double da;17 18// tdw19void 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 targets22  __tdw(lla, llb, 1);23}24 25void test_tdw(void) {26// CHECK64: void @llvm.ppc.tdw(i64 %0, i64 %1, i32 13)27// CHECK32-ERROR: error: this builtin is only available on 64-bit targets28  __builtin_ppc_tdw(lla, llb, 13);29}30 31// trapd32void test_trapd(void) {33// CHECK64: void @llvm.ppc.trapd(i64 %conv)34// CHECK32-ERROR: error: this builtin is only available on 64-bit targets35  __builtin_ppc_trapd(da);36}37 38void test_xl_trapd(void) {39// CHECK64: void @llvm.ppc.trapd(i64 %conv)40// CHECK32-ERROR: error: this builtin is only available on 64-bit targets41  __trapd(da);42}43