[llvm] [GVN] Excluding dead blocks before full redundancy eliminations (PR #88556)
Min-Yih Hsu via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 12 11:53:58 PDT 2024
mshockwave wrote:
To give a little more context on the root cause of #88051, here is the CFG from the reduced test case:

GVN crashed when it's processing the `%.pre1.pre` load instruction at block `for.end54splitsplit` on the right-hand-side of the picture. MemoryDependenceAnalysis indicates that the said load instruction might be congruent with values from block `if.else`. However, `if.else` is a dead block as the entire program is just a infinite loop consisting of blocks `for.body3`, `for.cond6.preheader`, and `if.end49`. This triggered the assertion as GVN doesn't allow dead-block-origined values for full redundancy elimination.
This patch filters out any dead blocks from the list of candidate values right before full redundancy elimination.
https://github.com/llvm/llvm-project/pull/88556
More information about the llvm-commits
mailing list