Allow targets to compute masked bits for intrinsics.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27357 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2006-04-02 06:15:09 +00:00
parent 350bec0fb9
commit 1482b5fc7a

View File

@ -619,9 +619,10 @@ bool TargetLowering::SimplifyDemandedBits(SDOperand Op, uint64_t DemandedMask,
} }
case ISD::ADD: case ISD::ADD:
case ISD::SUB: case ISD::SUB:
// Just use ComputeMaskedBits to compute output bits, there are no case ISD::INTRINSIC_WO_CHAIN:
// simplifications that can be done here, and sub always demands all input case ISD::INTRINSIC_W_CHAIN:
// bits. case ISD::INTRINSIC_VOID:
// Just use ComputeMaskedBits to compute output bits.
ComputeMaskedBits(Op, DemandedMask, KnownZero, KnownOne, Depth); ComputeMaskedBits(Op, DemandedMask, KnownZero, KnownOne, Depth);
break; break;
} }
@ -916,8 +917,12 @@ void TargetLowering::ComputeMaskedBits(SDOperand Op, uint64_t Mask,
} }
default: default:
// Allow the target to implement this method for its nodes. // Allow the target to implement this method for its nodes.
if (Op.getOpcode() >= ISD::BUILTIN_OP_END) if (Op.getOpcode() >= ISD::BUILTIN_OP_END) {
case ISD::INTRINSIC_WO_CHAIN:
case ISD::INTRINSIC_W_CHAIN:
case ISD::INTRINSIC_VOID:
computeMaskedBitsForTargetNode(Op, Mask, KnownZero, KnownOne); computeMaskedBitsForTargetNode(Op, Mask, KnownZero, KnownOne);
}
return; return;
} }
} }