brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · ebb8160 Raw
27 lines · c
1// REQUIRES: powerpc-registered-target2// RUN: %clang_cc1 -triple powerpc64-unknown-linux-gnu \3// RUN:   -emit-llvm %s -o - -target-cpu pwr7 | FileCheck %s4// RUN: %clang_cc1 -triple powerpc64le-unknown-linux-gnu \5// RUN:   -emit-llvm %s -o - -target-cpu pwr8 | FileCheck %s6// RUN: %clang_cc1 -triple powerpc64-unknown-aix \7// RUN:   -emit-llvm %s -o - -target-cpu pwr7 | FileCheck %s8// RUN: not %clang_cc1 -triple powerpc-unknown-aix \9// RUN:   -emit-llvm %s -o - -target-cpu pwr7 2>&1 | FileCheck %s --check-prefix=CHECK-32-ERROR10 11extern long int sli;12extern unsigned long int uli;13 14long long test_builtin_ppc_mulhd() {15  // CHECK-LABEL:    @test_builtin_ppc_mulhd(16  // CHECK:          %2 = call i64 @llvm.ppc.mulhd(i64 %0, i64 %1)17  // CHECK-32-ERROR: error: this builtin is only available on 64-bit targets18  return __builtin_ppc_mulhd(sli, sli);19}20 21unsigned long long test_builtin_ppc_mulhdu() {22  // CHECK-LABEL:    @test_builtin_ppc_mulhdu(23  // CHECK:          %2 = call i64 @llvm.ppc.mulhdu(i64 %0, i64 %1)24  // CHECK-32-ERROR: error: this builtin is only available on 64-bit targets25  return __builtin_ppc_mulhdu(uli, uli);26}27