http://llvm.org/bugs/show_bug.cgi?id=3913
Summary: another miscompilation with -loop-index-split
Product: libraries
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: Scalar Optimizations
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
Created an attachment (id=2779)
--> (http://llvm.org/bugs/attachment.cgi?id=2779)
test case
With the attached test case I get:
$ llvm-as -o - tiny2.ll | lli ; echo $?
0
$ llvm-as -o - tiny2.ll | opt -loop-index-split | lli ; echo $?
3
It's optimising:
i = 0; do { if (i == 99) BODY; } while (++i != 10);
(which never executes BODY) into:
if (99 > 0 && 99 != 10) BODY;
(which does execute BODY).
--
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