Changeset View
Changeset View
Standalone View
Standalone View
llvm/trunk/test/Analysis/ScalarEvolution/trip-count12.ll
; RUN: opt < %s -analyze -scalar-evolution | FileCheck %s | ; RUN: opt < %s -analyze -scalar-evolution | FileCheck %s | ||||
; CHECK: Determining loop execution counts for: @test | ; CHECK: Determining loop execution counts for: @test | ||||
; CHECK: Loop %for.body: backedge-taken count is ((-2 + %len) /u 2) | ; CHECK: Loop %for.body: backedge-taken count is ((-2 + %len)<nsw> /u 2) | ||||
; CHECK: Loop %for.body: max backedge-taken count is 1073741823 | ; CHECK: Loop %for.body: max backedge-taken count is 1073741823 | ||||
define zeroext i16 @test(i16* nocapture %p, i32 %len) nounwind readonly { | define zeroext i16 @test(i16* nocapture %p, i32 %len) nounwind readonly { | ||||
entry: | entry: | ||||
%cmp2 = icmp sgt i32 %len, 1 | %cmp2 = icmp sgt i32 %len, 1 | ||||
br i1 %cmp2, label %for.body.preheader, label %for.end | br i1 %cmp2, label %for.body.preheader, label %for.end | ||||
for.body.preheader: ; preds = %entry | for.body.preheader: ; preds = %entry | ||||
Show All 23 Lines |