[llvm-bugs] [Bug 28513] New: [x86] go to eleven

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Jul 11 15:09:09 PDT 2016


https://llvm.org/bugs/show_bug.cgi?id=28513

            Bug ID: 28513
           Summary: [x86] go to eleven
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: X86
          Assignee: unassignedbugs at nondot.org
          Reporter: spatel+llvm at rotateright.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

int foo(int x) {
  return x * 11;
}

define i32 @foo(i32 %x) {
  %mul = mul nsw i32 %x, 11
  ret i32 %mul
}

------------------------------------------------------------------------------

GCC 6.1:
        leal    (%rdi,%rdi,4), %eax
        leal    (%rdi,%rax,2), %eax
        ret


ICC 13:
        lea       (%rdi,%rdi,8), %edx                           #2.14
        lea       (%rdx,%rdi,2), %eax                           #2.14
        ret                                                     #2.14

LLVM:
    imull    $11, %edi, %eax
    retq

-- 
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/20160711/63e86d53/attachment.html>


More information about the llvm-bugs mailing list