[PATCH] D121913: [VP] Fix VPintrinsic::getStaticVectorLength for vp.merge|select

Kazushi Marukawa via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Mar 19 17:01:33 PDT 2022


kaz7 added inline comments.


================
Comment at: llvm/lib/IR/IntrinsicInst.cpp:302-303
   Value *VPMask = getMaskParam();
-  assert(VPMask && "No mask param?");
+  if (!VPMask)
+    return GetVectorLengthOfType(getType());
   return GetVectorLengthOfType(VPMask->getType());
----------------
Please add assert in then closure to see whether it is vp.select or vp.merge.
Also please add comments to describe why vp.select and vp.merge don't have a mask operand here for future references.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D121913



More information about the llvm-commits mailing list