[llvm] 20b071c - [CGData] Change placeholder from `undef` to `poison` when initializing a vector [NFC] (#119134)

via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 10 07:04:45 PST 2024


Author: Pedro Lobo
Date: 2024-12-10T15:04:41Z
New Revision: 20b071c0ebd9a5de7e1893cf6f1d6081819015c8

URL: https://github.com/llvm/llvm-project/commit/20b071c0ebd9a5de7e1893cf6f1d6081819015c8
DIFF: https://github.com/llvm/llvm-project/commit/20b071c0ebd9a5de7e1893cf6f1d6081819015c8.diff

LOG: [CGData] Change placeholder from `undef` to `poison` when initializing a vector [NFC] (#119134)

Added: 
    

Modified: 
    llvm/lib/CodeGen/GlobalMergeFunctions.cpp

Removed: 
    


################################################################################
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