[PATCH] D145169: FastRegAlloc: Fix implicit operands not rewritten

Gaƫtan Bossu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 2 09:26:56 PST 2023


gbossu created this revision.
Herald added subscribers: hiraditya, qcolombet, MatzeB.
Herald added a project: All.
gbossu requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

The patch makes sure that no implicit operands are skipped when
rewriting uses. Previously, some implicit operands could get
removed/simplified away in the process. Eventually, this caused the next
operands in the instruction to be shifted to the left. This was uncaught
by the standard "for" loop iterating over operands.

As a consequence, some operands could be skipped and not rewritten to use
the allocated physical register. Ultimately, this means some virtual
registers could be left after regallocfast.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D145169

Files:
  llvm/lib/CodeGen/RegAllocFast.cpp
  llvm/test/CodeGen/ARM/regalloc-fast-rewrite-implicits.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D145169.501894.patch
Type: text/x-patch
Size: 4636 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230302/f1344c14/attachment.bin>


More information about the llvm-commits mailing list