1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00
llvm-mirror/test/CodeGen/PowerPC/dcbt.ll
Amy Kwan 04ae1ab1c3 [PowerPC] Add support for llvm.ppc.dcbt, llvm.ppc.dcbtst, llvm.ppc.isync intrinsics
This patch adds LLVM intrinsics for the dcbt (Data Cache Block Touch),
dcbtst (Data Cache Block Touch for Store) and isync (Instruction
Synchronize) instructions.

The intrinsic for dcbt and dcbst in this patch are named llvm.ppc.dcbt.with.hint
and llvm.ppc.dcbtst.with.hint respectively as there already exists an intrinsic
for llvm.ppc.dcbt and llvm.ppc.dcbtst. However, the original variants of the
intrinsics do not accept the TH immediate field, whereas these variants do.

Differential Revision: https://reviews.llvm.org/D79633
2020-06-26 13:02:18 -05:00

68 lines
1.8 KiB
LLVM

; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc -mtriple=powerpc64le-unknown-linux-gnu < %s \
; RUN: -verify-machineinstrs -ppc-asm-full-reg-names \
; RUN: -ppc-vsr-nums-as-vr | FileCheck %s
define void @dcbt_with_hint_test1(i8* %a) {
; CHECK-LABEL: dcbt_with_hint_test1:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: dcbt 0, r3
; CHECK-NEXT: blr
entry:
tail call void @llvm.ppc.dcbt.with.hint(i8* %a, i32 0)
ret void
}
define void @dcbt_with_hint_test2(i8* %a) {
; CHECK-LABEL: dcbt_with_hint_test2:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: dcbt 0, r3, 8
; CHECK-NEXT: blr
entry:
tail call void @llvm.ppc.dcbt.with.hint(i8* %a, i32 8)
ret void
}
define void @dcbt_with_hint_test3(i8* %a) {
; CHECK-LABEL: dcbt_with_hint_test3:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: dcbt 0, r3, 15
; CHECK-NEXT: blr
entry:
tail call void @llvm.ppc.dcbt.with.hint(i8* %a, i32 15)
ret void
}
define void @dcbtst_with_hint_test1(i8* %a) {
; CHECK-LABEL: dcbtst_with_hint_test1:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: dcbtst 0, r3
; CHECK-NEXT: blr
entry:
tail call void @llvm.ppc.dcbtst.with.hint(i8* %a, i32 0)
ret void
}
define void @dcbtst_with_hint_test2(i8* %a) {
; CHECK-LABEL: dcbtst_with_hint_test2:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: dcbtst 0, r3, 8
; CHECK-NEXT: blr
entry:
tail call void @llvm.ppc.dcbtst.with.hint(i8* %a, i32 8)
ret void
}
define void @dcbtst_with_hint_test3(i8* %a) {
; CHECK-LABEL: dcbtst_with_hint_test3:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: dcbtst 0, r3, 15
; CHECK-NEXT: blr
entry:
tail call void @llvm.ppc.dcbtst.with.hint(i8* %a, i32 15)
ret void
}
declare void @llvm.ppc.dcbt.with.hint(i8*, i32)
declare void @llvm.ppc.dcbtst.with.hint(i8*, i32)