MandarinISelLowering.cpp
/// isMaskedValueZeroForTargetNode - Return true if 'Op & Mask' is known to
/// be zero. Op is expected to be a target specific node. Used by DAG
/// combiner.

Return true if 'Op & Mask' is known to
be zero. Op is expected to be a target specific node. Used by DAG
combiner.
Return true if ' Op & Mask ' is known to be zero . Op is expected to be a target specific node . Used by DAG combiner .
void MandarinTargetLowering::computeMaskedBitsForTargetNode
                                (const SDValue Op,
                                 APInt &KnownZero,
                                 APInt &KnownOne,
                                 const SelectionDAG &DAG,
                                 unsigned Depth) const {
  APInt KnownZero2, KnownOne2;
  KnownZero = KnownOne = APInt(KnownZero.getBitWidth(), 0);
  switch (Op.getOpcode()) {
  default: break;
  case MDISD::SELECT_CC:
    DAG.ComputeMaskedBits(Op.getOperand(1), KnownZero, KnownOne, Depth+1);
    DAG.ComputeMaskedBits(Op.getOperand(0), KnownZero2, KnownOne2, Depth+1);
    assert((KnownZero & KnownOne) == 0 && "Bits known to be one AND zero?");
    assert((KnownZero2 & KnownOne2) == 0 && "Bits known to be one AND zero?");
    KnownOne &= KnownOne2;
    KnownZero &= KnownZero2;
    break;
  }
}
void MandarinTargetLowering :: computeMaskedBitsForTargetNode ( const SDValue Op , APInt & KnownZero , APInt & KnownOne , const SelectionDAG & DAG , unsigned Depth ) const { APInt KnownZero2 , KnownOne2 ; KnownZero = KnownOne = APInt ( KnownZero . getBitWidth ( ) , 0 ) ; switch ( Op . getOpcode ( ) ) { default : break ; case MDISD :: SELECT_CC : DAG . ComputeMaskedBits ( Op . getOperand ( 1 ) , KnownZero , KnownOne , Depth + 1 ) ; DAG . ComputeMaskedBits ( Op . getOperand ( 0 ) , KnownZero2 , KnownOne2 , Depth + 1 ) ; assert ( ( KnownZero & KnownOne ) == 0 && " " ) ; assert ( ( KnownZero2 & KnownOne2 ) == 0 && " " ) ; KnownOne &= KnownOne2 ; KnownZero &= KnownZero2 ; break ; } }
isMaskedValueZeroForTargetNode - Return true if 'Op & Mask' is known to
be zero.
isMaskedValueZeroForTargetNode - Return true if ' Op & Mask ' is known to be zero .
// Only known if known in both the LHS and RHS.
