1 ; RUN: llc -march=hexagon -O2 < %s | FileCheck %s
2 ; CHECK-NOT: if {{.*}} cmp{{.*}}jump
5 %s.1 = type { ptr, ptr, ptr, i32, [0 x i8] }
8 @g0 = private unnamed_addr constant [29 x i8] c"BUG: failure at %s:%d/%s()!\0A\00", align 1
9 @g1 = private unnamed_addr constant [11 x i8] c"fs/namei.c\00", align 1
10 @g2 = private unnamed_addr constant [8 x i8] c"putname\00", align 1
11 @g3 = private unnamed_addr constant [5 x i8] c"BUG!\00", align 1
12 @g4 = external global ptr, align 4
14 ; Function Attrs: nounwind
15 define void @f0(ptr %a0) #0 {
17 %v0 = alloca ptr, align 4
18 store ptr %a0, ptr %v0, align 4
19 br label %b1, !llvm.loop !0
22 %v1 = load ptr, ptr %v0, align 4
23 %v2 = getelementptr inbounds %s.1, ptr %v1, i32 0, i32 3
24 %v3 = load i32, ptr %v2, align 4
25 %v4 = icmp sle i32 %v3, 0
26 %v5 = xor i1 %v4, true
27 %v6 = xor i1 %v5, true
28 %v7 = zext i1 %v6 to i32
29 %v8 = call i32 @llvm.expect.i32(i32 %v7, i32 0)
30 %v9 = icmp ne i32 %v8, 0
31 br i1 %v9, label %b2, label %b5
37 %v10 = call i32 (ptr, ...) @f1(ptr @g0, ptr @g1, i32 246, ptr @g2)
38 call void (ptr, ...) @f2(ptr @g3)
41 b4: ; No predecessors!
44 b5: ; preds = %b4, %b1
48 %v11 = load ptr, ptr %v0, align 4
49 %v12 = getelementptr inbounds %s.1, ptr %v11, i32 0, i32 3
50 %v13 = load i32, ptr %v12, align 4
51 %v14 = add i32 %v13, -1
52 store i32 %v14, ptr %v12, align 4
53 %v15 = icmp sgt i32 %v14, 0
54 br i1 %v15, label %b7, label %b8
60 %v16 = load ptr, ptr %v0, align 4
61 %v18 = load ptr, ptr %v16, align 4
62 %v19 = load ptr, ptr %v0, align 4
63 %v20 = getelementptr inbounds %s.1, ptr %v19, i32 0, i32 4
64 %v22 = icmp ne ptr %v18, %v20
65 br i1 %v22, label %b9, label %b10
68 %v23 = load ptr, ptr @g4, align 4
69 %v24 = load ptr, ptr %v0, align 4
70 %v26 = load ptr, ptr %v24, align 4
71 call void @f3(ptr %v23, ptr %v26)
72 %v27 = load ptr, ptr %v0, align 4
73 call void @f4(ptr %v27)
77 %v29 = load ptr, ptr @g4, align 4
78 %v30 = load ptr, ptr %v0, align 4
79 call void @f3(ptr %v29, ptr %v30)
82 b11: ; preds = %b10, %b9, %b7
86 ; Function Attrs: nounwind readnone
87 declare i32 @llvm.expect.i32(i32, i32) #1
89 ; Function Attrs: nounwind
90 declare i32 @f1(ptr, ...) #0
92 ; Function Attrs: noreturn
93 declare void @f2(ptr, ...) #2
95 ; Function Attrs: nounwind
96 declare void @f3(ptr, ptr) #0
98 ; Function Attrs: nounwind
99 declare void @f4(ptr) #0
101 attributes #0 = { nounwind }
102 attributes #1 = { nounwind readnone }
103 attributes #2 = { noreturn }
105 !0 = distinct !{!0, !1}
106 !1 = !{!"llvm.loop.threadify", i32 101214632}