[PATCH] D46059: [Scalarizer] Remove unreachable blocks before scalarizing a function

Bjorn Pettersson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 25 06:46:32 PDT 2018


bjope created this revision.

When scalarizing PHI nodes we might try to examine/rewrite
InsertElement nodes in predecessors. If those predecessors
are unreachable from entry, then the IR in those blocks could
have unexpected properties resulting in infinite loops in
Scatterer::operator[]. So we better remove unreachable blocks
before scalarizing the function.


Repository:
  rL LLVM

https://reviews.llvm.org/D46059

Files:
  lib/Transforms/Scalar/Scalarizer.cpp
  test/Transforms/Scalarizer/phi_unreachable_pred.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46059.143920.patch
Type: text/x-patch
Size: 3970 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180425/4880d0f8/attachment.bin>


More information about the llvm-commits mailing list