1 // REQUIRES: powerpc-registered-target
2 // RUN: %clang_cc1 -triple powerpc64-unknown-unknown -target-cpu pwr7 \
3 // RUN: -emit-llvm %s -o - | FileCheck %s
5 // RUN: %clang_cc1 -triple powerpc64le-unknown-unknown -target-cpu pwr8 \
6 // RUN: -emit-llvm %s -o - | FileCheck %s
8 // CHECK-LABEL: define{{.*}} signext i32 @test_divwe
13 return __builtin_divwe(a
, b
);
14 // CHECK: @llvm.ppc.divwe
17 // CHECK-LABEL: define{{.*}} zeroext i32 @test_divweu
18 unsigned int test_divweu(void)
22 return __builtin_divweu(a
, b
);
23 // CHECK: @llvm.ppc.divweu
26 // CHECK-LABEL: define{{.*}} i64 @test_divde
27 long long test_divde(void)
31 return __builtin_divde(a
, b
);
32 // CHECK: @llvm.ppc.divde
35 // CHECK-LABEL: define{{.*}} i64 @test_divdeu
36 unsigned long long test_divdeu(void)
38 unsigned long long a
= 74ULL;
39 unsigned long long b
= 32ULL;
40 return __builtin_divdeu(a
, b
);
41 // CHECK: @llvm.ppc.divdeu
44 // CHECK-LABEL: define{{.*}} i64 @test_bpermd
45 long long test_bpermd(void)
49 return __builtin_bpermd(a
, b
);
50 // CHECK: @llvm.ppc.bpermd