https://bugs.llvm.org/show_bug.cgi?id=48411
Bug ID: 48411
Summary: Failure to optimize out loop that does nothing and
always ends
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Scalar Optimizations
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
void foo(unsigned short int x, unsigned char y) {
unsigned char *a = &y;
while (y < 3) {
if (x != 0)
++y;
++y;
}
}
This can be optimized out. GCC does this optimization, but LLVM does not.
Comparison here : https://godbolt.org/z/cM4bj8
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs