[PATCH] D110311: [IR] Change the default value of InstertElement to poison (1/4)
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 27 09:17:56 PDT 2021
spatel added a comment.
In D110311#3017248 <https://reviews.llvm.org/D110311#3017248>, @hyeongyukim wrote:
> 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?
Sure - that lines up with the similar create/constructors that we added for shuffles, so it makes things symmetric (even if we don't have too many uses for it currently).
@aqjune - sorry for losing track of D93817 <https://reviews.llvm.org/D93817> / D94380 <https://reviews.llvm.org/D94380> . If the newer patches are as you expected, feel free to approve (no need to wait for me).
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