Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / CodeGen / PowerPC / builtins-ppc-p7.c
blob73883f9f38f3b3dcf5158e24799408b71cbb447e
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
9 int test_divwe(void)
11 int a = 74;
12 int b = 32;
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)
20 unsigned int a = 74;
21 unsigned int b = 32;
22 return __builtin_divweu(a, b);
23 // CHECK: @llvm.ppc.divweu
26 // CHECK-LABEL: define{{.*}} i64 @test_divde
27 long long test_divde(void)
29 long long a = 74LL;
30 long long b = 32LL;
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)
47 long long a = 74LL;
48 long long b = 32LL;
49 return __builtin_bpermd(a, b);
50 // CHECK: @llvm.ppc.bpermd