Kai Luo d9630c34f4 [PowerPC][GISel] Select sync instructions required by atomic operations
This is part of selecting `G_ATOMIC*` instructions. Select `isync`, `sync` and `lwsync` in GISel.

Reviewed By: arsenm

Differential Revision: https://reviews.llvm.org/D141360
2023-01-11 16:25:46 +08:00

22 lines
581 B
LLVM

; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc -verify-machineinstrs -mtriple=powerpc64le -global-isel \
; RUN: -ppc-asm-full-reg-names < %s | FileCheck %s
declare void @llvm.ppc.isync()
declare void @llvm.ppc.sync()
declare void @llvm.ppc.lwsync()
define void @test_sync() {
; CHECK-LABEL: test_sync:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: isync
; CHECK-NEXT: sync
; CHECK-NEXT: lwsync
; CHECK-NEXT: blr
entry:
call void @llvm.ppc.isync()
call void @llvm.ppc.sync()
call void @llvm.ppc.lwsync()
ret void
}