[PATCH] D110311: [IR] Change the default value of InstertElement to poison (1/4)

Hyeongyu Kim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 23 00:40:57 PDT 2021


hyeongyukim added a comment.

Like D110226 <https://reviews.llvm.org/D110226>, D110227 <https://reviews.llvm.org/D110227>, and D110230 <https://reviews.llvm.org/D110230>, It would be better to change undef to poison in one place.

  Value *CreateInsertElement(Type *VecTy, Value *NewElt, Value *Idx,
                              const Twine &Name = "") {
     return CreateInsertElement(PoisonValue::get(VecTy), NewElt, Idx, Name);
   }
  
   Value *CreateInsertElement(Type *VecTy, Value *NewElt, uint64_t Idx,
                              const Twine &Name = "") {
     return CreateInsertElement(PoisonValue::get(VecTy), NewElt, Idx, Name);
   }

@spatel How about adding these two functions, which makes an empty placeholder for InsertElement?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D110311/new/

https://reviews.llvm.org/D110311



More information about the llvm-commits mailing list