42 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py UTC_ARGS: --version 42; RUN: opt < %s -disable-output "-passes=print<scalar-evolution>" -scalar-evolution-classify-expressions=0 2>&1 | FileCheck %s3 4 5define zeroext i16 @test(ptr nocapture %p, i32 %len) nounwind readonly {6;7; CHECK-LABEL: 'test'8; CHECK-NEXT: Determining loop execution counts for: @test9; CHECK-NEXT: Loop %for.body: backedge-taken count is ((-2 + %len) /u 2)10; CHECK-NEXT: Loop %for.body: constant max backedge-taken count is i32 107374182311; CHECK-NEXT: Loop %for.body: symbolic max backedge-taken count is ((-2 + %len) /u 2)12; CHECK-NEXT: Loop %for.body: Trip multiple is 113;14entry:15 %cmp2 = icmp sgt i32 %len, 116 br i1 %cmp2, label %for.body.preheader, label %for.end17 18for.body.preheader: ; preds = %entry19 br label %for.body20 21for.body: ; preds = %for.body, %for.body.preheader22 %p.addr.05 = phi ptr [ %incdec.ptr, %for.body ], [ %p, %for.body.preheader ]23 %len.addr.04 = phi i32 [ %sub, %for.body ], [ %len, %for.body.preheader ]24 %res.03 = phi i32 [ %add, %for.body ], [ 0, %for.body.preheader ]25 %incdec.ptr = getelementptr inbounds i16, ptr %p.addr.05, i32 126 %0 = load i16, ptr %p.addr.05, align 227 %conv = zext i16 %0 to i3228 %add = add i32 %conv, %res.0329 %sub = add nsw i32 %len.addr.04, -230 %cmp = icmp sgt i32 %sub, 131 br i1 %cmp, label %for.body, label %for.cond.for.end_crit_edge32 33for.cond.for.end_crit_edge: ; preds = %for.body34 %extract.t = trunc i32 %add to i1635 br label %for.end36 37for.end: ; preds = %for.cond.for.end_crit_edge, %entry38 %res.0.lcssa.off0 = phi i16 [ %extract.t, %for.cond.for.end_crit_edge ], [ 0, %entry ]39 ret i16 %res.0.lcssa.off040}41 42