bolt/deps/llvm-18.1.8/llvm/test/CodeGen/PowerPC/inline-asm-clobber-warning.ll

23 lines
890 B
LLVM
Raw Normal View History

2025-02-14 19:21:04 +01:00
; RUN: llc < %s -verify-machineinstrs -mtriple=powerpc-unknown-unkown \
; RUN: -mcpu=pwr7 2>&1 | FileCheck %s
; RUN: llc < %s -verify-machineinstrs -mtriple=powerpc64-unknown-unkown \
; RUN: -mcpu=pwr7 2>&1 | FileCheck %s
define void @test_r1_clobber() {
entry:
call void asm sideeffect "nop", "~{r1}"()
ret void
}
; CHECK: warning: inline asm clobber list contains reserved registers: R1
; CHECK-NEXT: note: Reserved registers on the clobber list may not be preserved across the asm statement, and clobbering them may lead to undefined behaviour.
define void @test_x1_clobber() {
entry:
call void asm sideeffect "nop", "~{x1}"()
ret void
}
; CHECK: warning: inline asm clobber list contains reserved registers: X1
; CHECK-NEXT: note: Reserved registers on the clobber list may not be preserved across the asm statement, and clobbering them may lead to undefined behaviour.