[llvm] 950bc6c - [LoopFuse] Change placeholder from `undef` to `poison` (#131535)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Mar 16 15:44:43 PDT 2025
Author: Pedro Lobo
Date: 2025-03-16T22:44:39Z
New Revision: 950bc6cd77455b1ec1679cf9f125055e2de1910f
URL: https://github.com/llvm/llvm-project/commit/950bc6cd77455b1ec1679cf9f125055e2de1910f
DIFF: https://github.com/llvm/llvm-project/commit/950bc6cd77455b1ec1679cf9f125055e2de1910f.diff
LOG: [LoopFuse] Change placeholder from `undef` to `poison` (#131535)
Use `poison` instead of `undef` as a placeholder for phi entries of
unreachable predecessors.
Added:
Modified:
llvm/lib/Transforms/Scalar/LoopFuse.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Scalar/LoopFuse.cpp b/llvm/lib/Transforms/Scalar/LoopFuse.cpp
index eaf89b23c26f7..5bba3016ba4a1 100644
--- a/llvm/lib/Transforms/Scalar/LoopFuse.cpp
+++ b/llvm/lib/Transforms/Scalar/LoopFuse.cpp
@@ -1968,7 +1968,7 @@ struct LoopFuser {
PHINode::Create(LCV->getType(), 2, LCPHI->getName() + ".afterFC0");
L1HeaderPHI->insertBefore(L1HeaderIP);
L1HeaderPHI->addIncoming(LCV, FC0.Latch);
- L1HeaderPHI->addIncoming(UndefValue::get(LCV->getType()),
+ L1HeaderPHI->addIncoming(PoisonValue::get(LCV->getType()),
FC0.ExitingBlock);
LCPHI->setIncomingValue(L1LatchBBIdx, L1HeaderPHI);
More information about the llvm-commits
mailing list