reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced

References

lib/CodeGen/SelectionDAG/DAGCombiner.cpp
10544   if (SrcVT == VT)
10549     return DAG.getNode(ISD::TRUNCATE, SDLoc(N), VT, N0.getOperand(0));
10553     SDValue C = DAG.getNode(ISD::TRUNCATE, SDLoc(N), VT, N0);
10563     if (N0.getOperand(0).getValueType().bitsLT(VT))
10564       return DAG.getNode(N0.getOpcode(), SDLoc(N), VT, N0.getOperand(0));
10566     if (N0.getOperand(0).getValueType().bitsGT(VT))
10567       return DAG.getNode(ISD::TRUNCATE, SDLoc(N), VT, N0.getOperand(0));
10588       LegalTypes && !LegalOperations && N0->hasOneUse() && VT != MVT::i1) {
10615         TLI.isTruncateFree(SrcVT, VT)) {
10618       SDValue TruncOp0 = DAG.getNode(ISD::TRUNCATE, SL, VT, N0.getOperand(1));
10619       SDValue TruncOp1 = DAG.getNode(ISD::TRUNCATE, SL, VT, N0.getOperand(2));
10620       return DAG.getNode(ISD::SELECT, SDLoc(N), VT, Cond, TruncOp0, TruncOp1);
10626       (!LegalOperations || TLI.isOperationLegal(ISD::SHL, VT)) &&
10627       TLI.isTypeDesirableForOp(ISD::SHL, VT)) {
10630     unsigned Size = VT.getScalarSizeInBits();
10633       EVT AmtVT = TLI.getShiftAmountTy(VT, DAG.getDataLayout());
10635       SDValue Trunc = DAG.getNode(ISD::TRUNCATE, SL, VT, N0.getOperand(0));
10640       return DAG.getNode(ISD::SHL, SL, VT, Trunc, Amt);
10646       TLI.isTruncateFree(SrcVT.getScalarType(), VT.getScalarType())) {
10648     EVT SVT = VT.getScalarType();
10654     return DAG.getBuildVector(VT, DL, TruncOps);
10661   if (Level == AfterLegalizeVectorOps && VT.isVector() &&
10667     EVT TruncVecEltTy = VT.getVectorElementType();
10673       unsigned TruncVecNumElts = VT.getVectorNumElements();
10683       return DAG.getBuildVector(VT, SDLoc(N), Opnds);
10692   if (!VT.isVector()) {
10694         APInt::getLowBitsSet(N0.getValueSizeInBits(), VT.getSizeInBits());
10696       return DAG.getNode(ISD::TRUNCATE, SDLoc(N), VT, Shorter);
10701   if (!LegalTypes || TLI.isTypeDesirableForOp(N0.getOpcode(), VT)) {
10710           LN0->getMemoryVT().getStoreSizeInBits() < VT.getSizeInBits()) {
10712                                          VT, LN0->getChain(), LN0->getBasePtr(),
10740                                      VT.getVectorElementType(),
10745       return DAG.getUNDEF(VT);
10759       return DAG.getNode(ISD::CONCAT_VECTORS, SDLoc(N), VT, Opnds);
10767   if (N0.getOpcode() == ISD::BITCAST && !VT.isVector()) {
10770     if (VecSrcVT.isVector() && VecSrcVT.getScalarType() == VT &&
10777       return DAG.getNode(ISD::EXTRACT_VECTOR_ELT, SL, VT, VecSrc,
10783   if (!VT.isVector() &&
10794        TLI.isOperationLegal(N0.getOpcode(), VT))) {
10796     auto X = DAG.getNode(ISD::TRUNCATE, SL, VT, N0.getOperand(0));
10797     auto Y = DAG.getNode(ISD::TRUNCATE, SL, VT, N0.getOperand(1));
10798     auto VTs = DAG.getVTList(VT, N0->getValueType(1));
10812           VT.getVectorElementType())
10813         return DAG.getNode(ISD::EXTRACT_SUBVECTOR, SDLoc(N0->getOperand(0)), VT,
10838       if (VT.isScalarInteger() || TLI.isOperationLegal(N0.getOpcode(), VT)) {
10838       if (VT.isScalarInteger() || TLI.isOperationLegal(N0.getOpcode(), VT)) {
10840         SDValue NarrowL = DAG.getNode(ISD::TRUNCATE, DL, VT, N0.getOperand(0));
10841         SDValue NarrowR = DAG.getNode(ISD::TRUNCATE, DL, VT, N0.getOperand(1));
10842         return DAG.getNode(N0.getOpcode(), DL, VT, NarrowL, NarrowR);