1 ; RUN: llc -march=hexagon -O3 < %s | FileCheck %s
3 target triple = "hexagon"
6 ; CHECK: call __save_r16_through_r21
8 define i32 @f0(ptr nocapture %a0) #0 {
10 %v0 = tail call i32 @f1() #0
11 %v1 = tail call i32 @f1() #0
12 %v2 = tail call i32 @f1() #0
13 %v3 = tail call i32 @f1() #0
14 %v4 = load i8, ptr %a0, align 1
15 %v5 = icmp eq i8 %v4, 0
16 br i1 %v5, label %b4, label %b1
21 b2: ; preds = %b2, %b1
22 %v6 = phi i32 [ %v10, %b2 ], [ 0, %b1 ]
23 %v7 = phi i32 [ %v2, %b2 ], [ %v1, %b1 ]
24 %v8 = phi i32 [ %v7, %b2 ], [ %v0, %b1 ]
25 %v9 = tail call i32 @f1() #0
26 %v10 = add nsw i32 %v6, %v8
27 %v11 = tail call i32 @f1() #0
28 %v12 = load i8, ptr %a0, align 1
29 %v13 = icmp eq i8 %v12, 0
30 br i1 %v13, label %b3, label %b2
35 b4: ; preds = %b3, %b0
36 %v14 = phi i32 [ 0, %b0 ], [ %v10, %b3 ]
40 ; Function Attrs: nounwind optsize
41 declare i32 @f1(...) #0
43 attributes #0 = { nounwind optsize }