[LLVMbugs] [Bug 12376] New: Empty loop with undefined overflow in IV not optimized away.
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Tue Mar 27 13:03:20 PDT 2012
http://llvm.org/bugs/show_bug.cgi?id=12376
Bug #: 12376
Summary: Empty loop with undefined overflow in IV not optimized
away.
Product: libraries
Version: trunk
Platform: PC
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P
Component: Loop Optimizer
AssignedTo: unassignedbugs at nondot.org
ReportedBy: benny.kra at gmail.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
>From GCC PR23361:
void foo2(int a, int b)
{ for(;a<b;a+=4); }
void foo3(int*a, int* b)
{ for(;a<b;a++); }
foo2 has the nsw bit on the IV add, foo3 has an inbounds GEP. Both loops should
be eliminated (and are currently not handled at clang -O3).
We get them when "!=" is used for the condition instead of "<".
--
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