[PATCH] D52232: [IPSCCP] Fix a problem with removing labels in a switch with undef condition
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 18 14:44:43 PDT 2018
efriedma added inline comments.
================
Comment at: lib/Transforms/Scalar/SCCP.cpp:2020
- bool Folded = ConstantFoldTerminator(I->getParent());
+ bool Folded = ConstantFoldTerminator(I->getParent(),
+ false, nullptr, nullptr,
----------------
Maybe it would be more straightforward here to figure out the valid successor using isEdgeFeasible(), and explicitly emit the unconditional branch we want, instead of calling ConstantFoldTerminator.
I mean, the patch works as-is, but adding more flags to commonly used APIs like ConstantFoldTerminator makes them more difficult to understand.
Repository:
rL LLVM
https://reviews.llvm.org/D52232
More information about the llvm-commits
mailing list