[LLVMbugs] [Bug 24052] New: x86 assembly could be improved for expression x+9*y where x, y are int8_t
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Tue Jul 7 06:27:05 PDT 2015
https://llvm.org/bugs/show_bug.cgi?id=24052
Bug ID: 24052
Summary: x86 assembly could be improved for expression x+9*y
where x,y are int8_t
Product: new-bugs
Version: 3.6
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: new bugs
Assignee: unassignedbugs at nondot.org
Reporter: calixte.denizet at gmail.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
The following C code:
int8_t foo(int8_t x, int8_t y)
{
return x + 9 * y;
}
generates this assembly with clang:
movb $9, %cl
movb %sil, %al
mulb %cl
addb %al, %dil
movsbl %dil, %eax
and generates this one with gcc:
leal (%rsi,%rsi,8), %esi
leal (%rsi,%rdi), %eax
For information it is ok when args are int32_t.
--
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/20150707/e0893c2a/attachment.html>
More information about the llvm-bugs
mailing list