brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.5 KiB · fae506f Raw
49 lines · plain
1; Check that a callee-saved register will be saved correctly if2; the predicate-to-GPR spilling code uses it.3;4; RUN: llc -mtriple=hexagon -hexagon-initial-cfg-cleanup=0 < %s | FileCheck %s5;6; We expect to spill p0 into a general-purpose register and keep it there,7; without adding an extra spill of that register.8;9; CHECK: PredSpill:10; CHECK-DAG: r{{[0-9]+}} = p011; CHECK-DAG: p0 = r{{[0-9]+}}12; CHECK-NOT: = memw(r2913;14 15define void @PredSpill() {16entry:17  br i1 undef, label %if.then, label %if.else.1418 19if.then:                                          ; preds = %entry20  br i1 undef, label %if.end.57, label %if.else21 22if.else:                                          ; preds = %if.then23  unreachable24 25if.else.14:                                       ; preds = %entry26  br i1 undef, label %if.then.17, label %if.end.5727 28if.then.17:                                       ; preds = %if.else.1429  br i1 undef, label %if.end.57, label %if.then.2030 31if.then.20:                                       ; preds = %if.then.1732  %call21 = tail call i32 @myfun()33  %tobool22 = icmp eq i32 %call21, 034  %0 = tail call i32 @myfun()35  br i1 %tobool22, label %if.else.42, label %if.then.2336 37if.then.23:                                       ; preds = %if.then.2038  unreachable39 40if.else.42:                                       ; preds = %if.then.2041  ret void42 43if.end.57:                                        ; preds = %if.then.17, %if.else.14, %if.then44  ret void45}46 47declare i32 @myfun()48 49