[PATCH] D101273: [JumpThreading] Set KeepOneInputPHIs to be true when DeleteDeadBlocks

guopeilin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 25 19:27:54 PDT 2021


guopeilin created this revision.
guopeilin added a reviewer: wwei.
Herald added a subscriber: hiraditya.
guopeilin requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

After ProcessBlock, we might generate an unreachable loop, In this case,
we need to set the argument KeepOneInputPHIs to be true when DeleteDeadBlocks.
Otherwise we might generate invalid IRs that use not dominated by its
def in a self-loop.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D101273

Files:
  llvm/lib/Transforms/Scalar/JumpThreading.cpp
  llvm/test/Transforms/JumpThreading/keep-one-input-phis.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D101273.340416.patch
Type: text/x-patch
Size: 4711 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210426/4cf624a1/attachment.bin>


More information about the llvm-commits mailing list