[llvm] [LoopFuse] Change placeholder from `undef` to `poison` (PR #131535)
Pedro Lobo via llvm-commits
llvm-commits at lists.llvm.org
Sun Mar 16 11:55:34 PDT 2025
https://github.com/pedroclobo created https://github.com/llvm/llvm-project/pull/131535
Use `poison` instead of `undef` as a placeholder for phi entries of unreachable predecessors.
>From 9290974a6fe5c12f5432b52d049acc5ffa46ae96 Mon Sep 17 00:00:00 2001
From: Pedro Lobo <pedro.lobo at tecnico.ulisboa.pt>
Date: Sun, 16 Mar 2025 18:49:33 +0000
Subject: [PATCH] [LoopFuse] Change placeholder from `undef` to `poison`
Use `poison` instead of `undef` as a placeholder for phi entries of
unreachable predecessors.
---
llvm/lib/Transforms/Scalar/LoopFuse.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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