[PATCH] D149409: [ValueTracking] Handle bitcasts between vec-int-ptr in `isKnownNonZero`
Noah Goldstein via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Apr 29 11:45:40 PDT 2023
goldstein.w.n marked 3 inline comments as done.
goldstein.w.n added inline comments.
================
Comment at: llvm/lib/Analysis/ValueTracking.cpp:2766
+ if ((FromTy->isIntOrIntVectorTy() || FromTy->isPtrOrPtrVectorTy()) &&
+ getBitWidth(FromTy->getScalarType(), Q.DL) <= BitWidth)
+ return isKnownNonZero(I->getOperand(0), Depth, Q);
----------------
nikic wrote:
> I don't think this condition is sufficient. Consider a bitcast from `<4 x i3>` to `<3 x i4>`. The new element size needs to be a multiple.
Fixed + added test
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D149409/new/
https://reviews.llvm.org/D149409
More information about the llvm-commits
mailing list