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 \
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
9 vector
signed __int128 vslll
= {33};
11 void call_p7_builtins(void)
13 int a
= __builtin_divwe(33, 11);
14 unsigned int b
= __builtin_divweu(33U, 11U);
15 unsigned long long d
= __builtin_divde(33ULL, 11ULL);
16 unsigned long long e
= __builtin_divdeu(33ULL, 11ULL);
17 unsigned long long f
= __builtin_bpermd(33ULL, 11ULL);
18 __builtin_pack_vector_int128(33ULL, 11ULL);
19 __builtin_unpack_vector_int128(vslll
, 1);
22 // CHECK: error: this builtin is only valid on POWER7 or later CPUs
23 // CHECK: __builtin_divwe
24 // CHECK: error: this builtin is only valid on POWER7 or later CPUs
25 // CHECK: __builtin_divweu
26 // CHECK: error: this builtin is only valid on POWER7 or later CPUs
27 // CHECK: __builtin_divde
28 // CHECK: error: this builtin is only valid on POWER7 or later CPUs
29 // CHECK: __builtin_divdeu
30 // CHECK: error: this builtin is only valid on POWER7 or later CPUs
31 // CHECK: __builtin_bpermd
32 // CHECK: error: this builtin is only valid on POWER7 or later CPUs
33 // CHECK: __builtin_pack_vector_int128
34 // CHECK: error: this builtin is only valid on POWER7 or later CPUs
35 // CHECK: __builtin_unpack_vector_int128
36 // CHECK-32: error: this builtin is only available on 64-bit targets
37 // CHECK-32: __builtin_divde
38 // CHECK-32: error: this builtin is only available on 64-bit targets
39 // CHECK-32: __builtin_divdeu
40 // CHECK-32: error: this builtin is only available on 64-bit targets
41 // CHECK-32: __builtin_bpermd