1 // REQUIRES: powerpc-registered-target
2 // RUN: %clang_cc1 -triple powerpc64-unknown-linux-gnu \
3 // RUN: -emit-llvm %s -o - -target-cpu pwr7 | FileCheck %s
4 // RUN: %clang_cc1 -triple powerpc64le-unknown-linux-gnu \
5 // RUN: -emit-llvm %s -o - -target-cpu pwr8 | FileCheck %s
6 // RUN: %clang_cc1 -triple powerpc-unknown-aix \
7 // RUN: -emit-llvm %s -o - -target-cpu pwr7 | FileCheck %s
8 // RUN: %clang_cc1 -triple powerpc64-unknown-aix \
9 // RUN: -emit-llvm %s -o - -target-cpu pwr7 | FileCheck %s
12 extern unsigned int ui
;
14 int test_builtin_ppc_mulhw() {
15 // CHECK-LABEL: @test_builtin_ppc_mulhw(
16 // CHECK: %2 = call i32 @llvm.ppc.mulhw(i32 %0, i32 %1)
17 return __builtin_ppc_mulhw(si
, si
);
20 unsigned int test_builtin_ppc_mulhwu() {
21 // CHECK-LABEL: @test_builtin_ppc_mulhwu(
22 // CHECK: %2 = call i32 @llvm.ppc.mulhwu(i32 %0, i32 %1)
23 return __builtin_ppc_mulhwu(ui
, ui
);