xref: /llvm-project/clang/test/CodeGen/PowerPC/builtins-ppc-p7-disabled.c (revision fa1f88cdeca245497843c507167b84f5522e88cc)
1 // REQUIRES: powerpc-registered-target
2 // RUN: not %clang_cc1 -triple powerpc64-unknown-unknown \
3 // RUN: -target-cpu pwr6 -emit-llvm %s -o - 2>&1 \
4 // RUN: | FileCheck %s
5 
6 // RUN: not %clang_cc1 -triple powerpc-unknown-unknown -emit-llvm %s -o - 2>&1 \
7 // RUN: -target-cpu pwr7 | FileCheck %s -check-prefix=CHECK-32
8 
9 // CHECK: error: use of '__int128' with '__vector' requires extended Altivec support (available on POWER8 or later)
10 vector signed __int128 vslll = {33};
11 
call_p7_builtins(void)12 void call_p7_builtins(void)
13 {
14   int a = __builtin_divwe(33, 11);
15   unsigned int b = __builtin_divweu(33U, 11U);
16   unsigned long long d = __builtin_divde(33ULL, 11ULL);
17   unsigned long long e = __builtin_divdeu(33ULL, 11ULL);
18   unsigned long long f = __builtin_bpermd(33ULL, 11ULL);
19   __builtin_pack_vector_int128(33ULL, 11ULL);
20   __builtin_unpack_vector_int128(vslll, 1);
21 }
22 
23 // CHECK-32: error: this builtin is only available on 64-bit targets
24 // CHECK-32: __builtin_divde
25 // CHECK-32: error: this builtin is only available on 64-bit targets
26 // CHECK-32: __builtin_divdeu
27 // CHECK-32: error: this builtin is only available on 64-bit targets
28 // CHECK-32: __builtin_bpermd
29