xref: /llvm-project/clang/test/CodeGen/PowerPC/builtins-ppc-xlcompat-stfiw.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 pwr8 | FileCheck %s
7 // RUN: %clang_cc1 -O2 -triple powerpc64-unknown-aix \
8 // RUN:   -emit-llvm %s -o - -target-cpu pwr8 | FileCheck %s
9 
10 extern const int *cia;
11 extern double da;
12 
test_stfiw(void)13 void test_stfiw(void) {
14   // CHECK-LABEL: test_stfiw
15   // CHECK: void @llvm.ppc.stfiw(ptr %0, double %1)
16   __builtin_ppc_stfiw(cia, da);
17 }
18 
test_xl_stfiw(void)19 void test_xl_stfiw(void) {
20   // CHECK-LABEL: test_xl_stfiw
21   // CHECK: void @llvm.ppc.stfiw(ptr %0, double %1)
22   __stfiw(cia, da);
23 }
24