[LLVMbugs] [Bug 1296] NEW: poor codegen for code size
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Fri Mar 30 18:18:19 PDT 2007
http://llvm.org/bugs/show_bug.cgi?id=1296
Summary: poor codegen for code size
Product: libraries
Version: 1.0
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Common Code Generator Code
AssignedTo: unassignedbugs at nondot.org
ReportedBy: sabre at nondot.org
This contrived testcase:
int foo(int A, int B, int C) {
int i;
int result = 0;
if (A == 1) {
for (i = 0; i < 1000; ++i) {
if (i & B) {result = 1; break; }
}
} else if (A == 0) {
for (i = 0; i < 1000; ++i) {
if (i & C) {result = 1; break; }
}
} else if (A == 2) {
for (i = 0; i < 1000; ++i) {
if (i & C) {result = 1; break; }
}
}
out:
return result;
}
Produces silly code like this:
LBB1_19: #bb13.out.loopexit1_crit_edge
movl $1, %eax
jmp LBB1_15 #out
LBB1_20: #bb.out.loopexit_crit_edge
movl $1, %eax
jmp LBB1_15 #out
LBB1_21: #bb27.out.loopexit3_crit_edge
movl $1, %eax
jmp LBB1_15 #out
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
More information about the llvm-bugs
mailing list