[llvm-bugs] [Bug 41952] New: [x86] shiftAmountMod should be more eager?
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon May 20 15:03:48 PDT 2019
https://bugs.llvm.org/show_bug.cgi?id=41952
Bug ID: 41952
Summary: [x86] shiftAmountMod should be more eager?
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Backend: X86
Assignee: unassignedbugs at nondot.org
Reporter: lebedev.ri at gmail.com
CC: craig.topper at gmail.com, llvm-bugs at lists.llvm.org,
llvm-dev at redking.me.uk, spatel+llvm at rotateright.com
unsigned test(unsigned val, unsigned a, unsigned b) {
unsigned shift = (32 - a) - b;
return val << shift;
}
clang produces
mov eax, 32
sub eax, esi
sub eax, edx
shlx eax, edi, eax
icc produces
neg esi # <- yay
sub esi, edx
mov ecx, esi
shl edi, cl
https://godbolt.org/z/gdGx_u
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190520/263a1b32/attachment.html>
More information about the llvm-bugs
mailing list