[PATCH] D153773: ValueTracking: Handle ptrmask in computeKnownBits
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 26 10:23:06 PDT 2023
arsenm added inline comments.
================
Comment at: llvm/lib/Analysis/ValueTracking.cpp:1719
+ const Value *Mask = I->getOperand(1);
+ Known2 = KnownBits(Mask->getType()->getIntegerBitWidth());
+ computeKnownBits(Mask, Known2, Depth + 1, Q);
----------------
nikic wrote:
> This will assert if ptrmask is working on vectors.
It seems to not work on vectors:
```
declare <2 x ptr> @llvm.ptrmask.v2p0.v2i64(<2 x ptr>, <2 x i64>)
define <2 x ptr> @ptrmask_align4_ptr_align1_vector(<2 x ptr> %ptr) {
%ptrmask = call <2 x ptr> @llvm.ptrmask.v2p0.v2i64(<2 x ptr> %ptr, <2 x i64> <i64 -4, i64 -4>)
ret <2 x ptr> %ptrmask
}
Intrinsic has incorrect return type!
ptr @llvm.ptrmask.v2p0.v2i64
```
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D153773/new/
https://reviews.llvm.org/D153773
More information about the llvm-commits
mailing list