[LLVMbugs] [Bug 2265] New: Can't solve trip count for simple loop
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Wed Apr 30 00:27:59 PDT 2008
http://llvm.org/bugs/show_bug.cgi?id=2265
Summary: Can't solve trip count for simple loop
Product: new-bugs
Version: unspecified
Platform: PC
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: new bugs
AssignedTo: unassignedbugs at nondot.org
ReportedBy: resistor at mac.com
CC: llvmbugs at cs.uiuc.edu
Here's a pretty simple loop:
define i32 @"test function"(i32 %i0, i32 %j0) {
BB1:
br label %BB2
BB2: ; preds = %BB5, %BB1
%k2 = phi i32 [ 0, %BB1 ], [ %k3, %BB5 ] ; <i32>
[#uses=2]
%kcond = icmp slt i32 %k2, 100 ; <i1> [#uses=1]
br i1 %kcond, label %BB5, label %BB4
BB4: ; preds = %BB2
ret i32 1
BB5: ; preds = %BB2
%k3 = add i32 %k2, 1 ; <i32> [#uses=1]
br label %BB2
}
The {BB2, BB5} loop has an obvious trip count of 100, Loop::getTripCount fails
to realize this. This is blocking loop deletion from removing the loop.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list