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

            Bug ID: 24308
           Summary: assembler: suboptimal encoding of memory operand
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: X86
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

Given the following assembly input

        vpaddd          16+0-4(%rdi, %rax), %xmm0, %xmm0
        vpaddd          16+(0-4)(%rdi, %rax), %xmm0, %xmm0
        vpaddd          (16+0-4)(%rdi, %rax), %xmm0, %xmm0
        vpaddd          (16+0)-4(%rdi, %rax), %xmm0, %xmm0

clang creates suboptimal object code for the last instruction (using a 32-bit
offset instead of an 8-bit one):

Disassembly of section .text:

0000000000000000 <.text>:
   0:   c5 f9 fe 44 07 0c       vpaddd 0xc(%rdi,%rax,1),%xmm0,%xmm0
   6:   c5 f9 fe 44 07 0c       vpaddd 0xc(%rdi,%rax,1),%xmm0,%xmm0
   c:   c5 f9 fe 44 07 0c       vpaddd 0xc(%rdi,%rax,1),%xmm0,%xmm0
  12:   c5 f9 fe 84 07 0c 00    vpaddd 0xc(%rdi,%rax,1),%xmm0,%xmm0
  19:   00 00

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to