mirror of
https://github.com/Gericom/teak-llvm.git
synced 2025-06-20 03:55:48 -04:00

Summary: A block address may be used in inline assembly. In which case it requires a name so that the asm parser has something to parse. Creating a name for every block address is a large hammer, but is necessary because at the point when a temp symbol is created we don't necessarily know if it's used in inline asm. This ensures that it exists regardless. Reviewers: nickdesaulniers, craig.topper Subscribers: nathanchance, javed.absar, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D65352 llvm-svn: 368478
20 lines
517 B
LLVM
20 lines
517 B
LLVM
; RUN: llc < %s -mtriple=x86_64-linux-gnu -filetype=obj -o - \
|
|
; RUN: | llvm-objdump -triple x86_64-linux-gnu -d - \
|
|
; RUN: | FileCheck %s
|
|
|
|
; CHECK: 0000000000000000 test1:
|
|
; CHECK-NEXT: 0: 74 00 je 0 <test1+0x2>
|
|
; CHECK-NEXT: 2: c3 retq
|
|
|
|
define void @test1() {
|
|
entry:
|
|
callbr void asm sideeffect "je ${0:l}", "X,~{dirflag},~{fpsr},~{flags}"(i8* blockaddress(@test1, %a.b.normal.jump))
|
|
to label %asm.fallthrough [label %a.b.normal.jump]
|
|
|
|
asm.fallthrough:
|
|
ret void
|
|
|
|
a.b.normal.jump:
|
|
ret void
|
|
}
|