[PATCH] D140496: [TailDuplicator] Fix old bugs in TailDuplicator::duplicateInstruction

Bjorn Pettersson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 11 08:28:33 PST 2023


bjope added a comment.

Gentle ping!

Let me know if I should try to find more reviewers, not sure who else is good at subreg hierarchies etc.
But afaict the erroneous code was added in this commit by @kparzysz :

  commit 4773f647bdf86da3fb95d7e34513d12bea55d60d
  Author: Krzysztof Parzyszek <kparzysz at codeaurora.org>
  Date:   Tue Apr 26 18:36:34 2016 +0000
  
      [Tail duplication] Handle source registers with subregisters
      
      When a block is tail-duplicated, the PHI nodes from that block are
      replaced with appropriate COPY instructions. When those PHI nodes
      contained use operands with subregisters, the subregisters were
      dropped from the COPY instructions, resulting in incorrect code.
      
      Keep track of the subregister information and use this information
      when remapping instructions from the duplicated block.
      
      Differential Revision: http://reviews.llvm.org/D19337
      
      llvm-svn: 267583


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D140496/new/

https://reviews.llvm.org/D140496



More information about the llvm-commits mailing list