[PATCH] D88716: [TwoAddressInstruction][PowerPC] Call `regOverlapsSet` to find out real clobbers and uses

Kai Luo via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 1 20:58:01 PDT 2020


lkail created this revision.
lkail added reviewers: qcolombet, eli.friedman, Carrot, PowerPC.
Herald added subscribers: llvm-commits, shchenz, hiraditya, nemanjai.
Herald added a project: LLVM.
lkail requested review of this revision.

In `rescheduleKillAboveMI`, current implementation uses `SmallSet` to track reg's defs and uses. When comparing, use `SmallSet.count` to find if it's clobbered or used. It's not correctly if involving subregisters. This patch uses `regOverlapsSet` already used by `rescheduleMIBelowKill` to fix the issue.

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


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D88716

Files:
  llvm/lib/CodeGen/TwoAddressInstructionPass.cpp
  llvm/test/CodeGen/PowerPC/pr47707.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D88716.295725.patch
Type: text/x-patch
Size: 3899 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201002/60cca9b3/attachment.bin>


More information about the llvm-commits mailing list