[PATCH] D157263: [NewGVN] Unreachable if block in performSymbolicLoadEvaluation (NFC)
Manuel Brito via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 8 02:20:45 PDT 2023
ManuelJBrito updated this revision to Diff 548118.
ManuelJBrito added a comment.
Add assert, as per Alina's request.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D157263/new/
https://reviews.llvm.org/D157263
Files:
llvm/lib/Transforms/Scalar/NewGVN.cpp
Index: llvm/lib/Transforms/Scalar/NewGVN.cpp
===================================================================
--- llvm/lib/Transforms/Scalar/NewGVN.cpp
+++ llvm/lib/Transforms/Scalar/NewGVN.cpp
@@ -1534,9 +1534,8 @@
if (!MSSA->isLiveOnEntryDef(DefiningAccess)) {
if (auto *MD = dyn_cast<MemoryDef>(DefiningAccess)) {
Instruction *DefiningInst = MD->getMemoryInst();
- // If the defining instruction is not reachable, replace with poison.
- if (!ReachableBlocks.count(DefiningInst->getParent()))
- return createConstantExpression(PoisonValue::get(LI->getType()));
+ assert(ReachableBlocks.count(DefiningInst->getParent()) &&
+ "Defining instruction should be reachable");
// This will handle stores and memory insts. We only do if it the
// defining access has a different type, or it is a pointer produced by
// certain memory operations that cause the memory to have a fixed value
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D157263.548118.patch
Type: text/x-patch
Size: 956 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230808/c10eebaa/attachment.bin>
More information about the llvm-commits
mailing list