brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1008 B · 440ebb8 Raw
37 lines · plain
1; RUN: llc < %s | FileCheck %s2; Check for allocframe in a non-entry block LBB0_n.3; CHECK: LBB0_{{[0-9]+}}:4; CHECK:   allocframe5; Deallocframe may be in a different block, but must follow.6; CHECK: deallocframe7 8target datalayout = "e-m:e-p:32:32-i1:32-i64:64-a:0-v32:32-n16:32"9target triple = "hexagon"10 11; Function Attrs: nounwind12define i32 @foo(i32 %n, ptr %p) #0 {13entry:14  %cmp = icmp eq ptr %p, null15  br i1 %cmp, label %if.end, label %if.then16 17if.then:                                          ; preds = %entry18  %0 = load i32, ptr %p, align 419  %inc = add nsw i32 %0, 120  store i32 %inc, ptr %p, align 421  br label %return22 23if.end:                                           ; preds = %entry24  %call = tail call i32 @bar(i32 %n) #025  %add = add nsw i32 %call, 126  br label %return27 28return:                                           ; preds = %if.end, %if.then29  %retval.0 = phi i32 [ %0, %if.then ], [ %add, %if.end ]30  ret i32 %retval.031}32 33declare i32 @bar(...) #034 35attributes #0 = { nounwind }36 37