llvm-project/llvm/test/CodeGen/Generic/inline-asm-special-strings.ll
Nico Weber 833393e021 [asm] Correctly handle special names in variants
There's really no reason why anyone should use these special names in a variant.
I noticed this while reading the code: all other writes to OS are guarded by
this conditional, and the behavior with the check seems more correct, so
let's add the check.

Differential Revision: https://reviews.llvm.org/D113909
2021-11-15 15:37:09 -05:00

10 lines
289 B
LLVM

; RUN: llc -no-integrated-as < %s | FileCheck %s
define void @bar() nounwind {
; CHECK: foo 0 0{{$}}
tail call void asm sideeffect "foo ${:uid} ${:uid}", ""() nounwind
; CHECK: bar 1 x{{$}}
tail call void asm sideeffect "bar $(${:uid} x$| ${:uid} x$)", ""() nounwind
ret void
}