https://bugs.llvm.org/show_bug.cgi?id=46013
Bug ID: 46013
Summary: Failure to optimize out casting in division of casted
char (to int)
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Scalar Optimizations
Assignee: unassignedb...@nondot.org
Reporter: gabrav...@gmail.com
CC: llvm-bugs@lists.llvm.org
int f(signed char a)
{
return (((unsigned int)(int)a) / 2LL);
}
This can be optimized to `return (unsigned)(int)a >> 1;`. This transformation
is done by GCC, but not by LLVM.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs