Skip to content

Backward copy propagation failed w/ -g #48790

@llvmbot

Description

@llvmbot
Bugzilla Link 49446
Resolution FIXED
Resolved on Jul 02, 2021 09:10
Version trunk
OS Linux
Blocks #37076
Attachments The hot.cc is generated by creduce
Reporter LLVM Bugzilla Contributor
CC @predator5047,@jmorse,@pogo59
Fixed by commit(s) e90c6f5

Extended Description

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions