xref: /llvm-project/llvm/test/CodeGen/PowerPC/aix-inline-asm-clobber-warning.ll (revision 2cd32132dbf5ec4a0e62f8fea0cd48420561e970)
1; RUN: llc < %s -mtriple=powerpc-unknown-aix-xcoff -verify-machineinstrs \
2; RUN:     -mcpu=pwr7 -mattr=+altivec -O0 2>&1 | FileCheck %s
3; RUN: llc < %s -mtriple=powerpc64-unknown-aix-xcoff -verify-machineinstrs \
4; RUN:     -mcpu=pwr7 -mattr=+altivec -O0 2>&1 | FileCheck %s
5
6; CHECK: warning: inline asm clobber list contains reserved registers: R2
7; 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.
8
9@a = external global i32, align 4
10
11define void @bar() {
12  store i32 0, ptr @a, align 4
13  call void asm sideeffect "li 2, 1", "~{r2}"()
14  ret void
15}
16