[llvm-bugs] [Bug 49446] New: Backward copy propagation failed w/ -g

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Mar 5 01:44:42 PST 2021


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

            Bug ID: 49446
           Summary: Backward copy propagation failed w/ -g
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Common Code Generator Code
          Assignee: unassignedbugs at nondot.org
          Reporter: chenzhiwei03 at kuaishou.com
                CC: llvm-bugs at lists.llvm.org

Created attachment 24590
  --> https://bugs.llvm.org/attachment.cgi?id=24590&action=edit
The hot.cc is generated by creduce

To reproduce

> clang++ -c hot.cc -o dbg.o -O3 -g
> clang++ -c hot.cc -o rel.o -O3

Then diff the objdump outputs.

-  c2:  48 8d 6c 24 28          lea    0x28(%rsp),%rbp
-  c7:  48 89 eb                mov    %rbp,%rbx
-  ca:  0f 11 45 00             movups %xmm0,0x0(%rbp)
+  c2:  48 8d 5c 24 28          lea    0x28(%rsp),%rbx
+  c7:  0f 11 03                movups %xmm0,(%rbx)
+  ca:  8b 44 24 20             mov    0x20(%rsp),%eax

For those two instructions:

    lea 0x28(%rsp), %rbp
    mov %rbp, %rbx

can be applied with backward copy propagation to eliminate the rbp register.

-- 
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/20210305/ed1f53d0/attachment.html>


More information about the llvm-bugs mailing list