Skip to content

Conversation

@pedroclobo
Copy link
Member

Use poison instead of undef as a placeholder for phi entries of unreachable predecessors.

Use `poison` instead of `undef` as a placeholder for phi entries of
unreachable predecessors.
@llvmbot
Copy link
Member

llvmbot commented Mar 16, 2025

@llvm/pr-subscribers-llvm-transforms

Author: Pedro Lobo (pedroclobo)

Changes

Use poison instead of undef as a placeholder for phi entries of unreachable predecessors.


Full diff: https://github.com/llvm/llvm-project/pull/131535.diff

1 Files Affected:

  • (modified) llvm/lib/Transforms/Scalar/LoopFuse.cpp (+1-1)
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);

@pedroclobo pedroclobo merged commit 950bc6c into llvm:main Mar 16, 2025
13 checks passed
@pedroclobo pedroclobo deleted the loop-fuse-poison branch March 16, 2025 22:44
@llvm-ci
Copy link
Collaborator

llvm-ci commented Mar 16, 2025

LLVM Buildbot has detected a new failure on builder clang-cmake-x86_64-avx512-win running on avx512-intel64-win while building llvm at step 4 "cmake stage 1".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/81/builds/5303

Here is the relevant piece of the build log for the reference
Step 4 (cmake stage 1) failure: 'cmake -G ...' (failure)
'cmake' is not recognized as an internal or external command,
operable program or batch file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants