[llvm] [CodeGen] Add preliminary plumbing for `samesign` flag (PR #112354)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Oct 20 06:46:53 PDT 2024
================
@@ -1716,8 +1717,13 @@ bool TargetLowering::SimplifyDemandedBits(
// if we don't care about FP signed-zero. The use of SETLT with FP means
// that we don't care about NaNs.
if (CC == ISD::SETLT && Op1.getValueType().isInteger() &&
- (isNullConstant(Op1) || ISD::isBuildVectorAllZeros(Op1.getNode())))
+ (isNullConstant(Op1) || ISD::isBuildVectorAllZeros(Op1.getNode()))) {
+ if (Flags.hasSameSign()) {
+ Flags.setSameSign(false);
+ Op->setFlags(Flags);
----------------
goldsteinn wrote:
Ahh, I misunderstood earlier.
I don't think we need to drop `Op` flags here. We aren't simplifying `Op0` or `Op1` here, just replacing `Op` with `Op0`.
https://github.com/llvm/llvm-project/pull/112354
More information about the llvm-commits
mailing list