brintos

brintos / llvm-project-archived public Read only

0
0
Text · 615 B · 75f5d65 Raw
26 lines · plain
1; RUN: llc < %s -mtriple=i686-- -tailcallopt | FileCheck %s2 3declare i32 @putchar(i32)4 5define fastcc i32 @checktail(i32 %x, ptr %f, i32 %g) nounwind {6; CHECK-LABEL: checktail:7        %tmp1 = icmp sgt i32 %x, 08        br i1 %tmp1, label %if-then, label %if-else9 10if-then:11        %arg1    = add i32 %x, -112        call i32 @putchar(i32 90)       13; CHECK: jmpl *%e{{.*}}14        %res = tail call fastcc i32 %f( i32 %arg1, ptr %f, i32 %g)15        ret i32 %res16 17if-else:18        ret i32  %x19}20 21 22define i32 @main() nounwind { 23 %res = tail call fastcc i32 @checktail( i32 10, ptr @checktail,i32 10)24 ret i32 %res25}26