1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 20:51:52 +01:00
llvm-mirror/test/CodeGen/AArch64/inline-asm-blockaddress.ll
Nick Desaulniers b4e302c2c3 [TargetLowering] support BlockAddress as "i" inline asm constraint
Summary:
This allows passing address of labels to inline assembly "i" input
constraints.

Fixes pr/42502.

Reviewers: ostannard

Reviewed By: ostannard

Subscribers: void, echristo, nathanchance, ostannard, javed.absar, hiraditya, llvm-commits, srhines

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D64167

llvm-svn: 365664
2019-07-10 17:08:25 +00:00

13 lines
321 B
LLVM

; RUN: llc -mtriple=aarch64-unknown-linux-gnu < %s | FileCheck %s
; CHECK-LABEL: foo:
; CHECK: TEST .Ltmp0
define void @foo() {
entry:
br label %bar
bar:
call void asm sideeffect "#TEST $0", "i,~{dirflag},~{fpsr},~{flags}"(i8* blockaddress(@foo, %bar))
ret void
indirectgoto:
indirectbr i8* undef, [label %bar]
}