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

Sanjay Patel via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 29 07:24:10 PST 2020


spatel added inline comments.


================
Comment at: llvm/include/llvm/IR/IRBuilder.h:2527
   /// Create a unary shuffle. The second vector operand of the IR instruction
   /// is undefined.
   Value *CreateShuffleVector(Value *V, ArrayRef<int> Mask,
----------------
update code comment: undefined -> poison


================
Comment at: llvm/lib/IR/IRBuilder.cpp:1020
   Value *Zeros = ConstantAggregateZero::get(VectorType::get(I32Ty, EC));
-  return CreateShuffleVector(V, Undef, Zeros, Name + ".splat");
+  return CreateShuffleVector(V, Poison, Zeros, Name + ".splat");
 }
----------------
I'm still catching up on reviews/mails, so ignore if this was already discussed:
Can we change this usage of CreateShuffleVector to the unary operand version, so we're reducing the number of explicit places where we need to specify poison?


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