http://llvm.org/bugs/show_bug.cgi?id=20242
Bug ID: 20242
Summary: Missed CSE opportunity
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Scalar Optimizations
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
For this testcase
char *encode(char *p, unsigned v) {
if (v < 23) {
*(p++) = v | 128;
} else if (v < 42) {
*(p++) = v | 128;
*(p++) = v;
} else {
*(p++) = v | 128;
*(p++) = v >> 7;
}
return p;
}
The first line is the same in all 3 cases. We only merge the lower 2 cases at
clang -O3, leaving duplicated code around in the first and second case.
--
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