[PATCH] D62684: [X86] Fixup LEAs - Fix inconsistent codegen with/without debug info

Chris Dawson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 30 08:32:34 PDT 2019


cdawson created this revision.
cdawson added reviewers: aprantl, arsenm, probinson.
Herald added subscribers: hiraditya, wdng.
Herald added a project: LLVM.

The function `processInstrForSlow3OpLEA()` contains a register liveness check in `isSafeToClobberEFLAGS()` which calls `computeRegisterLiveness()`.

`computeRegisterLiveness()` will not be able to verify that a register is fully dead if the basic block has debug instructions at the start.

This patch fixes `computeRegisterLiveness()` for this case, which re-enables the optimization.


https://reviews.llvm.org/D62684

Files:
  llvm/lib/CodeGen/MachineBasicBlock.cpp
  llvm/test/CodeGen/X86/fixup-lea-g-no-change.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62684.202196.patch
Type: text/x-patch
Size: 60441 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190530/0c56fa91/attachment.bin>


More information about the llvm-commits mailing list