brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.3 KiB · 60a66ca Raw
36 lines · plain
1; Test that the updated regmask on the call to @fun1 preserves %r14 and2; %15. @fun1 will save and restore these registers since it contains a call.3;4; RUN: llc -mtriple=s390x-linux-gnu -mcpu=z13 -enable-ipra -print-regmask-num-regs=-1 \5; RUN:   -debug-only=ip-regalloc 2>&1 < %s | FileCheck --check-prefix=DBG %s6; REQUIRES: asserts7;8; DBG: fun1 function optimized for not having CSR9; DBG: Call Instruction After Register Usage Info Propagation :10; DBG-NEXT: CallBRASL @fun1{{.*}} $r14d $r15d11 12declare dso_local fastcc signext i32 @foo(ptr, i32 signext) unnamed_addr13 14define internal fastcc void @fun1(ptr %arg, ptr nocapture %arg1) unnamed_addr #0 {15bb:16  %tmp = load i16, ptr undef, align 217  %tmp2 = shl i16 %tmp, 418  %tmp3 = tail call fastcc signext i32 @foo(ptr nonnull %arg, i32 signext 5)19  %tmp4 = or i16 0, %tmp220  %tmp5 = or i16 %tmp4, 021  store i16 %tmp5, ptr undef, align 222  %tmp6 = getelementptr inbounds i16, ptr %arg, i64 523  %tmp7 = load i16, ptr %tmp6, align 224  store i16 %tmp7, ptr %arg1, align 225  ret void26}27 28define fastcc void @fun0(ptr nocapture readonly %arg, ptr nocapture %arg1, i32 signext %arg2) unnamed_addr {29bb:30  %a = alloca i8, i64 undef31  call fastcc void @fun1(ptr nonnull undef, ptr %arg1)32  ret void33}34 35attributes #0 = { norecurse nounwind "frame-pointer"="none" }36