[PATCH] D98316: [rs4gc] Simplify code by cloning existing instructions when inserting base chain [NFC]

Serguei Katkov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 16 19:30:51 PDT 2021


skatkov added a comment.

> For the phi case, the new pattern is actually safer.  Consider the case where we miss an operand.  With the old code, we'd have a syntactically valid phi node with the wrong input.  With the new code, the verifier would reject the phi as it would be missing an operand.

May be I'm missing something but to me it looks opposite :)
In case some operand is missed, old code will produce incorrect phi node while new one will contain wrong input...


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D98316



More information about the llvm-commits mailing list