1 ; RUN: llc -O2 -march=hexagon < %s | FileCheck %s
2 ; Rely on the comments generated by llc. Check that "if.then" was not predicated.
5 ; CHECK-NOT: if{{.*}}memd
7 %s.0 = type { [24 x i32], [24 x i32], [24 x i32], [24 x i32], [24 x i32], [24 x i32], [24 x i32], [24 x i32], [24 x i32], [24 x i32], [24 x i32], [24 x i32], [24 x i32], [24 x i32], [24 x i32], [24 x i32], [24 x i32], [3 x i32], [24 x i32], [8 x %s.1], [5 x i32] }
8 %s.1 = type { i32, i32 }
15 declare i32 @llvm.hexagon.S2.cl0(i32) #0
16 declare i32 @llvm.hexagon.S2.setbit.r(i32, i32) #0
17 declare i64 @llvm.hexagon.M2.vmpy2s.s0(i32, i32) #0
18 declare i64 @llvm.hexagon.M2.vmac2s.s0(i64, i32, i32) #0
19 declare i64 @llvm.hexagon.A2.vaddws(i64, i64) #0
20 declare i64 @llvm.hexagon.A2.vsubws(i64, i64) #0
21 declare i32 @llvm.hexagon.A4.modwrapu(i32, i32) #0
23 define void @f0(i32 %a0, ptr %a1) #1 {
27 b1: ; preds = %b5, %b0
28 %v0 = phi i32 [ 0, %b0 ], [ %v26, %b5 ]
29 %v1 = phi i32 [ 0, %b0 ], [ %v25, %b5 ]
30 %v2 = load i32, ptr @g1, align 4
31 %v3 = load i32, ptr @g2, align 8
32 %v4 = and i32 %v3, %v2
35 b2: ; preds = %b4, %b1
36 %v5 = phi i64 [ %v21, %b4 ], [ 0, %b1 ]
37 %v6 = phi i64 [ %v22, %b4 ], [ 0, %b1 ]
38 %v7 = phi i32 [ %v9, %b4 ], [ %v4, %b1 ]
39 %v8 = tail call i32 @llvm.hexagon.S2.cl0(i32 %v7)
40 %v9 = tail call i32 @llvm.hexagon.S2.setbit.r(i32 %v7, i32 %v8)
41 %v10 = getelementptr [10 x %s.0], ptr inttoptr (i32 -121502345 to ptr), i32 0, i32 %v1
42 %v11 = getelementptr %s.0, ptr %v10, i32 0, i32 12, i32 %v8
43 %v12 = load i32, ptr %v11, align 4
44 %v13 = tail call i64 @llvm.hexagon.M2.vmpy2s.s0(i32 %v12, i32 %v12)
45 %v14 = getelementptr %s.0, ptr %v10, i32 0, i32 13, i32 %v8
46 %v15 = load i32, ptr %v14, align 4
47 %v16 = tail call i64 @llvm.hexagon.M2.vmac2s.s0(i64 %v13, i32 %v15, i32 %v15)
48 %v17 = load i8, ptr @g3, align 1
50 %v19 = icmp eq i8 %v18, 0
51 br i1 %v19, label %b3, label %b4, !prof !0
54 %v20 = tail call i64 @llvm.hexagon.A2.vaddws(i64 %v5, i64 %v16)
55 store i64 %v20, ptr %a1, align 8
58 b4: ; preds = %b3, %b2
59 %v21 = phi i64 [ %v20, %b3 ], [ %v5, %b2 ]
60 %v22 = tail call i64 @llvm.hexagon.A2.vsubws(i64 %v6, i64 %v16)
61 %v23 = icmp eq i32 %v9, 0
62 br i1 %v23, label %b5, label %b2, !prof !1
66 %v25 = tail call i32 @llvm.hexagon.A4.modwrapu(i32 %v24, i32 10) #0
68 %v27 = icmp eq i32 %v26, %a0
69 br i1 %v27, label %b6, label %b1, !prof !1
72 store i64 %v16, ptr @g0, align 8
76 attributes #0 = { nounwind readnone }
77 attributes #1 = { nounwind }
79 !0 = !{!"branch_weights", i32 99, i32 1}
80 !1 = !{!"branch_weights", i32 10, i32 90}