25 lines · plain
1; RUN: opt < %s -S -passes=loop-unroll -unroll-max-iteration-count-to-analyze=100 -unroll-threshold=10 -unroll-max-percent-threshold-boost=200 | FileCheck %s2; RUN: opt < %s -S -passes='require<opt-remark-emit>,loop(loop-unroll-full)' -unroll-max-iteration-count-to-analyze=100 -unroll-threshold=10 -unroll-max-percent-threshold-boost=200 | FileCheck %s3target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"4 5define i64 @propagate_loop_phis() {6; CHECK-LABEL: @propagate_loop_phis(7; CHECK-NOT: br i18; CHECK: ret i64 39entry:10 br label %loop11 12loop:13 %iv = phi i64 [ 0, %entry ], [ %inc, %loop ]14 %x0 = phi i64 [ 0, %entry ], [ %x2, %loop ]15 %x1 = or i64 %x0, 116 %x2 = or i64 %x1, 217 %inc = add nuw nsw i64 %iv, 118 %cond = icmp sge i64 %inc, 1019 br i1 %cond, label %loop.end, label %loop20 21loop.end:22 %x.lcssa = phi i64 [ %x2, %loop ]23 ret i64 %x.lcssa24}25