brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.8 KiB · e0374c8 Raw
49 lines · plain
1; RUN: opt -passes='loop-unroll-full' -disable-verify -disable-loop-unrolling=true --mtriple x86_64-pc-linux-gnu -S -o - %s | FileCheck %s2 3; This checks that the loop full unroller will fire in the new pass manager4; when forced via #pragma in the source (or annotation in the code).5 6; Completely unroll the inner loop7; CHECK-LABEL: @foo8; CHECK: br i19; CHECK-NOT: br i110 11; Function Attrs: noinline nounwind optnone uwtable12define void @foo() local_unnamed_addr #0 {13bb:14  %tmp = alloca [5 x ptr], align 1615  br label %bb7.preheader16 17bb3.loopexit:                                     ; preds = %bb1018  %spec.select.lcssa = phi i32 [ %spec.select, %bb10 ]19  %tmp5.not = icmp eq i32 %spec.select.lcssa, 020  br i1 %tmp5.not, label %bb24, label %bb7.preheader21 22bb7.preheader:                                    ; preds = %bb3.loopexit, %bb23  %tmp1.06 = phi i32 [ 5, %bb ], [ %spec.select.lcssa, %bb3.loopexit ]24  br label %bb1025 26bb10:                                             ; preds = %bb10, %bb7.preheader27  %indvars.iv = phi i64 [ 0, %bb7.preheader ], [ %indvars.iv.next, %bb10 ]28  %tmp1.14 = phi i32 [ %tmp1.06, %bb7.preheader ], [ %spec.select, %bb10 ]29  %tmp13 = getelementptr inbounds [5 x ptr], ptr %tmp, i64 0, i64 %indvars.iv30  %tmp14 = load ptr, ptr %tmp13, align 831  %tmp15.not = icmp ne ptr %tmp14, null32  %tmp18 = sext i1 %tmp15.not to i3233  %spec.select = add nsw i32 %tmp1.14, %tmp1834  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 135  %exitcond.not = icmp eq i64 %indvars.iv.next, 536  br i1 %exitcond.not, label %bb3.loopexit, label %bb10, !llvm.loop !137 38bb24:                                             ; preds = %bb3.loopexit39  ret void40}41 42attributes #0 = { nounwind uwtable }43 44!llvm.module.flags = !{!0}45 46!0 = !{i32 1, !"wchar_size", i32 4}47!1 = distinct !{!1, !2}48!2 = !{!"llvm.loop.unroll.full"}49