[llvm] [CGData] Change placeholder from `undef` to `poison` (PR #119134)
Pedro Lobo via llvm-commits
llvm-commits at lists.llvm.org
Sun Dec 8 09:01:02 PST 2024
https://github.com/pedroclobo created https://github.com/llvm/llvm-project/pull/119134
Insert `poison` instead of `undef` when calling `insertvalue`.
>From acc417d55f5b28252ab0d78e21e5a774d61cf347 Mon Sep 17 00:00:00 2001
From: Pedro Lobo <pedro.lobo at tecnico.ulisboa.pt>
Date: Sun, 8 Dec 2024 16:55:38 +0000
Subject: [PATCH] [CGData] Change placeholder from `undef` to `poison`
---
llvm/lib/CodeGen/GlobalMergeFunctions.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/llvm/lib/CodeGen/GlobalMergeFunctions.cpp b/llvm/lib/CodeGen/GlobalMergeFunctions.cpp
index 470582885fab0c..1187ad06b73723 100644
--- a/llvm/lib/CodeGen/GlobalMergeFunctions.cpp
+++ b/llvm/lib/CodeGen/GlobalMergeFunctions.cpp
@@ -154,7 +154,7 @@ static Value *createCast(IRBuilder<> &Builder, Value *V, Type *DestTy) {
auto *DestAT = dyn_cast<ArrayType>(DestTy);
assert(DestAT);
assert(SrcAT->getNumElements() == DestAT->getNumElements());
- Value *Result = UndefValue::get(DestTy);
+ Value *Result = PoisonValue::get(DestTy);
for (unsigned int I = 0, E = SrcAT->getNumElements(); I < E; ++I) {
Value *Element =
createCast(Builder, Builder.CreateExtractValue(V, ArrayRef(I)),
More information about the llvm-commits
mailing list