1; RUN: llc -march=hexagon < %s | FileCheck %s 2; CHECK: loop0 3 4target triple = "hexagon" 5 6; Function Attrs: nounwind readonly 7define i32 @f0(i8* nocapture %a0, i8* nocapture %a1, i32 %a2) #0 { 8b0: 9 %v0 = icmp eq i32 %a2, 0 10 br i1 %v0, label %b6, label %b1 11 12b1: ; preds = %b0 13 br label %b2 14 15b2: ; preds = %b4, %b1 16 %v1 = phi i8* [ %v10, %b4 ], [ %a1, %b1 ] 17 %v2 = phi i8* [ %v9, %b4 ], [ %a0, %b1 ] 18 %v3 = phi i32 [ %v11, %b4 ], [ %a2, %b1 ] 19 %v4 = load i8, i8* %v2, align 1, !tbaa !0 20 %v5 = load i8, i8* %v1, align 1, !tbaa !0 21 %v6 = icmp eq i8 %v4, %v5 22 br i1 %v6, label %b4, label %b3 23 24b3: ; preds = %b2 25 %v7 = icmp ult i8 %v4, %v5 26 %v8 = select i1 %v7, i32 -1, i32 1 27 br label %b6 28 29b4: ; preds = %b2 30 %v9 = getelementptr inbounds i8, i8* %v2, i32 1 31 %v10 = getelementptr inbounds i8, i8* %v1, i32 1 32 %v11 = add i32 %v3, -1 33 %v12 = icmp eq i32 %v11, 0 34 br i1 %v12, label %b5, label %b2 35 36b5: ; preds = %b4 37 br label %b6 38 39b6: ; preds = %b5, %b3, %b0 40 %v13 = phi i32 [ %v8, %b3 ], [ 0, %b0 ], [ 0, %b5 ] 41 ret i32 %v13 42} 43 44attributes #0 = { nounwind readonly "target-cpu"="hexagonv55" } 45 46!0 = !{!1, !1, i64 0} 47!1 = !{!"omnipotent char", !2} 48!2 = !{!"Simple C/C++ TBAA"} 49