brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.3 KiB · bcedea5 Raw
30 lines · plain
1; RUN: llc < %s -mcpu=generic -mtriple=x86_64-linux -post-RA-scheduler=true | FileCheck %s2; RUN: llc < %s -mcpu=generic -mtriple=x86_64-win32 -post-RA-scheduler=true | FileCheck %s3; RUN: llc < %s -mcpu=generic -mtriple=x86_64-uefi -post-RA-scheduler=true | FileCheck %s4 5; FIXME: Redundant unused stack allocation could be eliminated.6; CHECK: subq  ${{24|72|80}}, %rsp7 8; Check that lowered arguments on the stack do not overwrite each other.9; Add %in1 %p1 to a different temporary register (%eax).10; CHECK: movl  [[A1:32|144]](%rsp), [[R1:%e..|%r.*d]]11; Move param %in1 to temp register (%r10d).12; CHECK: movl  [[A2:40|152]](%rsp), [[R2:%[a-z0-9]+]]13; Add %in1 %p1 to a different temporary register (%eax).14; CHECK: addl {{%edi|%ecx}}, [[R1]]15; Move param %in2 to stack.16; CHECK-DAG: movl  [[R2]], [[A1]](%rsp)17; Move result of addition to stack.18; CHECK-DAG: movl  [[R1]], [[A2]](%rsp)19; Eventually, do a TAILCALL20; CHECK: TAILCALL21 22declare tailcc i32 @tailcallee(i32 %p1, i32 %p2, i32 %p3, i32 %p4, i32 %p5, i32 %p6, i32 %a, i32 %b) nounwind23 24define tailcc i32 @tailcaller(i32 %p1, i32 %p2, i32 %p3, i32 %p4, i32 %p5, i32 %p6, i32 %in1, i32 %in2) nounwind {25entry:26        %tmp = add i32 %in1, %p127        %retval = tail call tailcc i32 @tailcallee(i32 %p1, i32 %p2, i32 %p3, i32 %p4, i32 %p5, i32 %p6, i32 %in2,i32 %tmp)28        ret i32 %retval29}30