[PATCH] D61300: [SCCP] Fix crash when trying to constant-fold terminators multiple times.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 30 03:28:08 PDT 2019


fhahn created this revision.
fhahn added reviewers: davide, efriedma, mssimpso.
Herald added a subscriber: hiraditya.
Herald added a project: LLVM.

If we fold a branch/switch to an unconditional branch to another dead block we
replace the branch with unreachable, to avoid attempting to fold the
unconditional branch.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D61300

Files:
  llvm/lib/Transforms/Scalar/SCCP.cpp
  llvm/test/Transforms/SCCP/switch-constantfold-crash.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D61300.197284.patch
Type: text/x-patch
Size: 3701 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190430/393ecd47/attachment.bin>


More information about the llvm-commits mailing list