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
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
15 %popcntb = tail call i64 @llvm.ppc.popcntb.i64.i64(i64 %a)
18 declare i64 @llvm.ppc.popcntb.i64.i64(i64)
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
28 call void @llvm.ppc.eieio()
31 declare void @llvm.ppc.eieio()
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
41 call void @llvm.ppc.iospace.eieio()
44 declare void @llvm.ppc.iospace.eieio()
46 define dso_local void @test_builtin_ppc_iospace_lwsync() {
47 ; CHECK-LABEL: test_builtin_ppc_iospace_lwsync:
48 ; CHECK: # %bb.0: # %entry
52 call void @llvm.ppc.iospace.lwsync()
55 declare void @llvm.ppc.iospace.lwsync()
57 define dso_local void @test_builtin_ppc_iospace_sync() {
58 ; CHECK-LABEL: test_builtin_ppc_iospace_sync:
59 ; CHECK: # %bb.0: # %entry
63 call void @llvm.ppc.iospace.sync()
66 declare void @llvm.ppc.iospace.sync()
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
75 %a = alloca ptr, align 8
76 %0 = load ptr, ptr %a, align 8
77 call void @llvm.ppc.icbt(ptr %0)
80 declare void @llvm.ppc.icbt(ptr)