| 1 |
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py |
| 2 |
; RUN: llc -verify-machineinstrs -mtriple=powerpc-unknown-aix \ |
| 3 |
; RUN: --ppc-asm-full-reg-names -mcpu=pwr7 < %s | FileCheck %s |
| 4 |
|
| 5 |
define dso_local i32 @test_builtin_ppc_popcntb_i32(i32 %a) local_unnamed_addr { |
| 6 |
; CHECK-LABEL: test_builtin_ppc_popcntb_i32: |
| 7 |
; CHECK: # %bb.0: # %entry |
| 8 |
; CHECK-NEXT: popcntb r3, r3 |
| 9 |
; CHECK-NEXT: blr |
| 10 |
entry: |
| 11 |
%popcntb = tail call i32 @llvm.ppc.popcntb.i32.i32(i32 %a) |
| 12 |
ret i32 %popcntb |
| 13 |
} |
| 14 |
declare i32 @llvm.ppc.popcntb.i32.i32(i32) |
| 15 |
|
| 16 |
define dso_local void @test_builtin_ppc_eieio() { |
| 17 |
; CHECK-LABEL: test_builtin_ppc_eieio: |
| 18 |
; CHECK: # %bb.0: # %entry |
| 19 |
; CHECK-NEXT: ori r2, r2, 0 |
| 20 |
; CHECK-NEXT: ori r2, r2, 0 |
| 21 |
; CHECK-NEXT: eieio |
| 22 |
; CHECK-NEXT: blr |
| 23 |
entry: |
| 24 |
call void @llvm.ppc.eieio() |
| 25 |
ret void |
| 26 |
} |
| 27 |
declare void @llvm.ppc.eieio() |
| 28 |
|
| 29 |
define dso_local void @test_builtin_ppc_iospace_eieio() { |
| 30 |
; CHECK-LABEL: test_builtin_ppc_iospace_eieio: |
| 31 |
; CHECK: # %bb.0: # %entry |
| 32 |
; CHECK-NEXT: ori r2, r2, 0 |
| 33 |
; CHECK-NEXT: ori r2, r2, 0 |
| 34 |
; CHECK-NEXT: eieio |
| 35 |
; CHECK-NEXT: blr |
| 36 |
entry: |
| 37 |
call void @llvm.ppc.iospace.eieio() |
| 38 |
ret void |
| 39 |
} |
| 40 |
declare void @llvm.ppc.iospace.eieio() |
| 41 |
|
| 42 |
define dso_local void @test_builtin_ppc_iospace_lwsync() { |
| 43 |
; CHECK-LABEL: test_builtin_ppc_iospace_lwsync: |
| 44 |
; CHECK: # %bb.0: # %entry |
| 45 |
; CHECK-NEXT: lwsync |
| 46 |
; CHECK-NEXT: blr |
| 47 |
entry: |
| 48 |
call void @llvm.ppc.iospace.lwsync() |
| 49 |
ret void |
| 50 |
} |
| 51 |
declare void @llvm.ppc.iospace.lwsync() |
| 52 |
|
| 53 |
define dso_local void @test_builtin_ppc_iospace_sync() { |
| 54 |
; CHECK-LABEL: test_builtin_ppc_iospace_sync: |
| 55 |
; CHECK: # %bb.0: # %entry |
| 56 |
; CHECK-NEXT: sync |
| 57 |
; CHECK-NEXT: blr |
| 58 |
entry: |
| 59 |
call void @llvm.ppc.iospace.sync() |
| 60 |
ret void |
| 61 |
} |
| 62 |
declare void @llvm.ppc.iospace.sync() |