http://llvm.org/bugs/show_bug.cgi?id=5256
Summary: SCEV misses simple finite loop
Product: libraries
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: Loop Optimizer
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected]
Created an attachment (id=3678)
--> (http://llvm.org/bugs/attachment.cgi?id=3678)
testcase
This code sample from bug 2306:
int foo(int left, int right)
{
int x=5;
int *bar = 0;
while(left<=right) {
left++;
bar = &x;
}
if(left<=right) {
return *bar;
}
return 0;
}
turns into the .ll file attached. The loop isn't eliminated because SCEV can't
seem to figure out the loop evolution in what should be a trivial loop with a
single exit, an indvar incrementing by 1 each time.
--
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs