[PATCH] D136523: [MSAN] Add handleCountZeroes for vector versions of ctlz and cttz.
Evgenii Stepanov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 24 10:54:21 PDT 2022
eugenis added inline comments.
================
Comment at: llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp:2974
+ void handleCountZeroes(IntrinsicInst &I) {
+ // if not vector operation, then just use default
+ Type::TypeID InputTypeID = I.getArgOperand(0)->getType()->getTypeID();
----------------
isn't this implementation strictly better than default? It handles the second operand correctly.
================
Comment at: llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp:2976
+ Type::TypeID InputTypeID = I.getArgOperand(0)->getType()->getTypeID();
+ if (InputTypeID != Type::FixedVectorTyID) {
+ if (!handleUnknownIntrinsic(I))
----------------
Is there a problem with scalable vectors? You could just use Type::isVectorTy() otherwise.
================
Comment at: llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp:2994
+ if (!constOperand->isZeroValue()) {
+ BoolZeroPoison = IRB.CreateICmpEQ(
+ Operand, Constant::getNullValue(Operand->getType()), "_mscz_bzp");
----------------
use CreateIsNull
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D136523/new/
https://reviews.llvm.org/D136523
More information about the llvm-commits
mailing list