[PATCH] D106053: [CodeGen] Remove pending AssertZext AssertSext in promoting FP_TO_INT
Xiang Zhang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 15 17:34:21 PDT 2021
xiangzhangllvm added a comment.
> I'm working on assumption that AssertZext means "if the operand is not poison, the high N bits are not set"
And In fact, current optimizations on AssertZext don't care about its operand's poison or other details, it just thought its hight N bits are 0.
for example, in
"SelectionDAG::computeKnownBits"
3297 case ISD::AssertZext: {
3298 EVT VT = cast<VTSDNode>(Op.getOperand(1))->getVT();
3299 APInt InMask = APInt::getLowBitsSet(BitWidth, VT.getSizeInBits());
3300 Known = computeKnownBits(Op.getOperand(0), Depth+1);
3301 Known.Zero |= (~InMask);
3302 Known.One &= (~Known.Zero);
3303 break;
You can see the high N bits directly be mark as zero.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D106053/new/
https://reviews.llvm.org/D106053
More information about the llvm-commits
mailing list