brintos

brintos / llvm-project-archived public Read only

0
0
Text · 868 B · 165234b Raw
41 lines · plain
1; RUN: llc -disable-tail-calls < %s | FileCheck --check-prefix=CALL %s2; RUN: llc < %s | FileCheck --check-prefix=JMP %s3 4target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128"5target triple = "x86_64-unknown-linux-gnu"6 7define dso_local i32 @helper() nounwind {8entry:9  ret i32 710}11 12define dso_local i32 @test1() nounwind {13entry:14  %call = tail call i32 @helper()15  ret i32 %call16}17 18; CALL-LABEL: test1:19; CALL-NOT: ret20; CALL: callq helper21; CALL: ret22 23; JMP-LABEL: test1:24; JMP-NOT: ret25; JMP: jmp helper # TAILCALL26 27define dso_local i32 @test2() nounwind {28entry:29  %call = tail call i32 @test2()30  ret i32 %call31}32 33; CALL-LABEL: test2:34; CALL-NOT: ret35; CALL: callq test236; CALL: ret37 38; JMP-LABEL: test2:39; JMP-NOT: ret40; JMP: jmp test2 # TAILCALL41