brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · 686ef5f Raw
29 lines · c
1// REQUIRES: powerpc-registered-target2// RUN: not %clang_cc1 -triple powerpc64-unknown-unknown \3// RUN: -target-cpu pwr6 -emit-llvm %s -o - 2>&1 \4// RUN: | FileCheck %s5 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-328 9// CHECK: error: use of '__int128' with '__vector' requires extended Altivec support (available on POWER8 or later)10vector signed __int128 vslll = {33};11 12void 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 targets24// CHECK-32: __builtin_divde25// CHECK-32: error: this builtin is only available on 64-bit targets26// CHECK-32: __builtin_divdeu27// CHECK-32: error: this builtin is only available on 64-bit targets28// CHECK-32: __builtin_bpermd29