[PATCH] D93793: [IR] Let IRBuilder's CreateVectorSplat use poison as inselt's placeholder

Nikita Popov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Dec 27 12:47:11 PST 2020


nikic added inline comments.


================
Comment at: llvm/lib/IR/IRBuilder.cpp:1012
 
   // First insert it into an undef vector so we can shuffle it.
   Type *I32Ty = getInt32Ty();
----------------
undef vector -> poison vector


================
Comment at: llvm/lib/IR/IRBuilder.cpp:1021
   Value *Zeros = ConstantAggregateZero::get(VectorType::get(I32Ty, EC));
   return CreateShuffleVector(V, Undef, Zeros, Name + ".splat");
 }
----------------
aqjune wrote:
> nlopes wrote:
> > while at it, don't you want to change this one to poison as well?
> It would be great, but there are many other places that create shufflevector with undef args (InstCombineCalls, etc). Since this and related patches are big changes, I think it might be good to land these first.
I think in this case it makes sense to change both at once, as it's part of one construction. It's odd that one uses undef and the other poison, even though both are equally non-demanded.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D93793



More information about the cfe-commits mailing list