1 ; RUN: llc -march=sparc < %s | FileCheck %s
3 ;; Verify that g1 (the output of first asm) is properly understood to
4 ;; be clobbered by the call instruction, and moved out of the way
5 ;; before it. (NOTE: remember delay slot; mov executes before call)
9 ; CHECK: call dosomething
12 define i32 @test1() nounwind {
14 %0 = tail call i32 asm sideeffect "ta $1", "={r1},i"(i32 9) nounwind
15 tail call void @dosomething() nounwind
19 ;; Also check using the value.
22 ; CHECK: call dosomething
27 define void @test2() local_unnamed_addr nounwind {
29 %0 = tail call i32 asm sideeffect "ta $1", "={r1},i"(i32 9) nounwind
30 tail call void @dosomething() nounwind
31 tail call void asm sideeffect "ta $0", "i,{r1}"(i32 10, i32 %0) nounwind
35 declare void @dosomething() local_unnamed_addr nounwind