[PATCH] D106053: [CodeGen] Remove pending AssertZext AssertSext in promoting FP_TO_INT
LuoYuanke via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jul 18 05:44:20 PDT 2021
LuoYuanke added a comment.
@efriedma, thank you for make the issue more clear. So the poison value is different to undef value. For poison value, we should not should assume it is zero value, but for undef value it is not harmful to assume the value is zero. Right?
I notice in the function `SelectionDAG::computeKnownBits` , the code assume the upper bit is zero (`Known.Zero |= (~InMask);`). Since the upper bit may be poison value, is it correct?
case ISD::AssertZext: {
EVT VT = cast<VTSDNode>(Op.getOperand(1))->getVT();
APInt InMask = APInt::getLowBitsSet(BitWidth, VT.getSizeInBits());
Known = computeKnownBits(Op.getOperand(0), Depth+1);
Known.Zero |= (~InMask);
Known.One &= (~Known.Zero);
break;
}
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D106053/new/
https://reviews.llvm.org/D106053
More information about the llvm-commits
mailing list