brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · 37a1add Raw
46 lines · plain
1; Test that the set of used phys regs used by interprocedural register2; allocation is correct for a test case where the called function (@fn2)3; itself has a call (to @fn1). @fn1 defines %r0l, while @fn2 defines4; %r0d. The RegUsageInfo for @fn2 must include %r0h.5;6; RUN: llc -mtriple=s390x-linux-gnu -mcpu=z13 -enable-ipra -print-regusage 2>&1 < %s \7; RUN:   | FileCheck %s8;9; CHECK: fn2 Clobbered Registers: {{.*}} $r0h10 11@h = external dso_local global [0 x i32], align 412@n = external dso_local global ptr, align 813 14define void @fn1() {15bb:16  br label %bb117 18bb1:                                              ; preds = %bb1, %bb19  %tmp = getelementptr inbounds [0 x i32], ptr @h, i64 0, i64 undef20  %tmp2 = load i32, ptr %tmp21  store i32 %tmp2, ptr undef22  br label %bb123}24 25define void @fn2() {26bb:27  br label %bb128 29bb1:                                              ; preds = %bb30  br i1 undef, label %bb2, label %bb331 32bb2:                                              ; preds = %bb133  store ptr null, ptr @n34  unreachable35 36bb3:                                              ; preds = %bb137  call void @fn1()38  unreachable39}40 41define void @main() {42bb:43  call void @fn2()44  ret void45}46