xref: /llvm-project/clang/test/CodeGen/PowerPC/builtins-ppc-xlcompat-prefetch.c (revision 39db5e1ed87363a9ffea81e53520b542201b3262)
1 // RUN: %clang_cc1 -O2 -triple powerpc64-unknown-linux-gnu \
2 // RUN:   -emit-llvm %s -o - -target-cpu pwr7 | FileCheck %s
3 // RUN: %clang_cc1 -O2 -triple powerpc64le-unknown-linux-gnu \
4 // RUN:   -emit-llvm %s -o - -target-cpu pwr8 | FileCheck %s
5 // RUN: %clang_cc1 -O2 -triple powerpc-unknown-aix \
6 // RUN:   -emit-llvm %s -o - -target-cpu pwr7 | FileCheck %s
7 // RUN: %clang_cc1 -O2 -triple powerpc64-unknown-aix \
8 // RUN:   -emit-llvm %s -o - -target-cpu pwr7 | FileCheck %s
9 
10 extern void *vpa;
11 
test_dcbtstt(void)12 void test_dcbtstt(void) {
13   // CHECK-LABEL: @test_dcbtstt
14   // CHECK: %0 = load ptr, ptr @vpa
15   // CHECK: tail call void @llvm.ppc.dcbtstt(ptr %0)
16   // CHECK: ret void
17   __dcbtstt(vpa);
18 }
19 
test_dcbtt(void)20 void test_dcbtt(void) {
21   // CHECK-LABEL: @test_dcbt
22   // CHECK: %0 = load ptr, ptr @vpa
23   // CHECK: tail call void @llvm.ppc.dcbtt(ptr %0)
24   // CHECK: ret void
25   __dcbtt(vpa);
26 }
27