Debian Codegraph @

llvm/test/CodeGen/PowerPC/builtins-ppc-xlcompat-sync-64.ll

raw
1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-unknown \
3 ; RUN: --ppc-asm-full-reg-names -mcpu=pwr7 < %s | FileCheck %s
4 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-unknown \
5 ; RUN: --ppc-asm-full-reg-names -mcpu=pwr8 < %s | FileCheck %s
6 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-aix \
7 ; RUN: --ppc-asm-full-reg-names -mcpu=pwr7 < %s | FileCheck %s
8
9 define dso_local i64 @test_builtin_ppc_popcntb_i64(i64 %a) local_unnamed_addr {
10 ; CHECK-LABEL: test_builtin_ppc_popcntb_i64:
11 ; CHECK: # %bb.0: # %entry
12 ; CHECK-NEXT: popcntb r3, r3
13 ; CHECK-NEXT: blr
14 entry:
15 %popcntb = tail call i64 @llvm.ppc.popcntb.i64.i64(i64 %a)
16 ret i64 %popcntb
17 }
18 declare i64 @llvm.ppc.popcntb.i64.i64(i64)
19
20 define dso_local void @test_builtin_ppc_eieio() {
21 ; CHECK-LABEL: test_builtin_ppc_eieio:
22 ; CHECK: # %bb.0: # %entry
23 ; CHECK-NEXT: ori r2, r2, 0
24 ; CHECK-NEXT: ori r2, r2, 0
25 ; CHECK-NEXT: eieio
26 ; CHECK-NEXT: blr
27 entry:
28 call void @llvm.ppc.eieio()
29 ret void
30 }
31 declare void @llvm.ppc.eieio()
32
33 define dso_local void @test_builtin_ppc_iospace_eieio() {
34 ; CHECK-LABEL: test_builtin_ppc_iospace_eieio:
35 ; CHECK: # %bb.0: # %entry
36 ; CHECK-NEXT: ori r2, r2, 0
37 ; CHECK-NEXT: ori r2, r2, 0
38 ; CHECK-NEXT: eieio
39 ; CHECK-NEXT: blr
40 entry:
41 call void @llvm.ppc.iospace.eieio()
42 ret void
43 }
44 declare void @llvm.ppc.iospace.eieio()
45
46 define dso_local void @test_builtin_ppc_iospace_lwsync() {
47 ; CHECK-LABEL: test_builtin_ppc_iospace_lwsync:
48 ; CHECK: # %bb.0: # %entry
49 ; CHECK-NEXT: lwsync
50 ; CHECK-NEXT: blr
51 entry:
52 call void @llvm.ppc.iospace.lwsync()
53 ret void
54 }
55 declare void @llvm.ppc.iospace.lwsync()
56
57 define dso_local void @test_builtin_ppc_iospace_sync() {
58 ; CHECK-LABEL: test_builtin_ppc_iospace_sync:
59 ; CHECK: # %bb.0: # %entry
60 ; CHECK-NEXT: sync
61 ; CHECK-NEXT: blr
62 entry:
63 call void @llvm.ppc.iospace.sync()
64 ret void
65 }
66 declare void @llvm.ppc.iospace.sync()
67
68 define dso_local void @test_builtin_ppc_icbt() {
69 ; CHECK-LABEL: test_builtin_ppc_icbt:
70 ; CHECK: # %bb.0: # %entry
71 ; CHECK-NEXT: ld r3, -8(r1)
72 ; CHECK-NEXT: icbt 0, 0, r3
73 ; CHECK-NEXT: blr
74 entry:
75 %a = alloca ptr, align 8
76 %0 = load ptr, ptr %a, align 8
77 call void @llvm.ppc.icbt(ptr %0)
78 ret void
79 }
80 declare void @llvm.ppc.icbt(ptr)