Home | History | Annotate | Download | only in SelectionDAG

Lines Matching refs:TRUNCATE

661     // BuildVectors can truncate their operands. Ignore that case here.
813 SDValue Trunc = DAG.getNode(ISD::TRUNCATE, dl, VT, SDValue(ExtLoad, 0));
949 return DAG.getNode(ISD::TRUNCATE, dl, VT,
996 return DAG.getNode(ISD::TRUNCATE, dl, VT,
1062 SDValue Result = DAG.getNode(ISD::TRUNCATE, dl, VT, NewLD);
1238 case ISD::TRUNCATE: return visitTRUNCATE(N);
2246 return DAG.getNode(ISD::TRUNCATE, DL, VT, N1);
2282 return DAG.getNode(ISD::TRUNCATE, DL, VT, N1);
2365 Hi = DAG.getNode(ISD::TRUNCATE, DL, VT, Hi);
2367 Lo = DAG.getNode(ISD::TRUNCATE, DL, VT, Lo);
2395 Hi = DAG.getNode(ISD::TRUNCATE, DL, VT, Hi);
2397 Lo = DAG.getNode(ISD::TRUNCATE, DL, VT, Lo);
2463 (N0.getOpcode() == ISD::TRUNCATE &&
3673 LHSShiftAmt.getOpcode() == ISD::TRUNCATE) &&
3677 RHSShiftAmt.getOpcode() == ISD::TRUNCATE)) {
3910 assert(N->getOpcode() == ISD::TRUNCATE);
3913 // (truncate:TruncVT (and N00, N01C)) -> (and (truncate:TruncVT N00), TruncC)
3924 DAG.getNode(ISD::TRUNCATE, SDLoc(N), TruncVT, N00),
3934 if (N->getOperand(1).getOpcode() == ISD::TRUNCATE &&
3999 if (N1.getOpcode() == ISD::TRUNCATE &&
4172 // If truncate is free for the target sext(shl) is likely to result in better
4179 // Determine what the truncate's result bitsize and type would be.
4190 // on that type, and the truncate to that type is both legal and free,
4194 TLI.isOperationLegalOrCustom(ISD::TRUNCATE, VT) &&
4201 SDValue Trunc = DAG.getNode(ISD::TRUNCATE, SDLoc(N0), TruncVT,
4210 if (N1.getOpcode() == ISD::TRUNCATE &&
4219 if (N0.getOpcode() == ISD::TRUNCATE &&
4236 return DAG.getNode(ISD::TRUNCATE, SDLoc(N), VT, SRA);
4305 if (N1C && N0.getOpcode() == ISD::TRUNCATE &&
4318 return DAG.getNode(ISD::TRUNCATE, SDLoc(N0), VT,
4399 if (N1.getOpcode() == ISD::TRUNCATE &&
4443 else if (Use->getOpcode() == ISD::TRUNCATE && Use->hasOneUse()) {
4444 // Also look pass the truncate.
4551 return DAG.getNode(ISD::TRUNCATE, SDLoc(N), VT, XORNode);
4854 // "fold ({s|z|a}ext (load x)) -> ({s|z|a}ext (truncate ({s|z|a}extload x)))"
4952 if (N0.getOpcode() == ISD::TRUNCATE) {
4953 // fold (sext (truncate (load x))) -> (sext (smaller load x))
4954 // fold (sext (truncate (srl (load x), c))) -> (sext (smaller load (x+c/n)))
4960 // CombineTo deleted the truncate, if needed, but not what's under it.
4986 // bits, just truncate to i32.
4988 return DAG.getNode(ISD::TRUNCATE, SDLoc(N), VT, Op);
4991 // fold (sext (truncate x)) -> (sextinreg x).
4997 Op = DAG.getNode(ISD::TRUNCATE, SDLoc(N0), VT, Op);
5003 // fold (sext (load x)) -> (sext (truncate (sextload x)))
5022 SDValue Trunc = DAG.getNode(ISD::TRUNCATE, SDLoc(N0),
5031 // fold (sext (sextload x)) -> (sext (truncate (sextload x)))
5032 // fold (sext ( extload x)) -> (sext (truncate (sextload x)))
5045 DAG.getNode(ISD::TRUNCATE, SDLoc(N0),
5076 SDValue Trunc = DAG.getNode(ISD::TRUNCATE,
5112 // truncate/sign extend
5157 // isTruncateOf - If N is a truncate of some other value, return true, record
5164 if (N->getOpcode() == ISD::TRUNCATE) {
5209 // fold (zext (truncate x)) -> (zext x) or
5210 // (zext (truncate x)) -> (truncate x)
5227 return DAG.getNode(ISD::TRUNCATE, SDLoc(N), VT, Op);
5233 // fold (zext (truncate (load x))) -> (zext (smaller load x))
5234 // fold (zext (truncate (srl (load x), c))) -> (zext (small load (x+c/n)))
5235 if (N0.getOpcode() == ISD::TRUNCATE) {
5241 // CombineTo deleted the truncate, if needed, but not what's under it.
5248 // fold (zext (truncate x)) -> (and x, mask)
5249 if (N0.getOpcode() == ISD::TRUNCATE &&
5252 // fold (zext (truncate (load x))) -> (zext (smaller load x))
5253 // fold (zext (truncate (srl (load x), c))) -> (zext (smaller load (x+c/n)))
5259 // CombineTo deleted the truncate, if needed, but not what's under it.
5270 Op = DAG.getNode(ISD::TRUNCATE, SDLoc(N), VT, Op);
5280 N0.getOperand(0).getOpcode() == ISD::TRUNCATE &&
5289 X = DAG.getNode(ISD::TRUNCATE, SDLoc(X), VT, X);
5297 // fold (zext (load x)) -> (zext (truncate (zextload x)))
5316 SDValue Trunc = DAG.getNode(ISD::TRUNCATE, SDLoc(N0),
5350 SDValue Trunc = DAG.getNode(ISD::TRUNCATE,
5362 // fold (zext (zextload x)) -> (zext (truncate (zextload x)))
5363 // fold (zext ( extload x)) -> (zext (truncate (zextload x)))
5376 DAG.getNode(ISD::TRUNCATE, SDLoc(N0), N0.getValueType(),
5410 // truncate/sign extend
5481 // fold (aext (truncate (load x))) -> (aext (smaller load x))
5482 // fold (aext (truncate (srl (load x), c))) -> (aext (small load (x+c/n)))
5483 if (N0.getOpcode() == ISD::TRUNCATE) {
5489 // CombineTo deleted the truncate, if needed, but not what's under it.
5496 // fold (aext (truncate x))
5497 if (N0.getOpcode() == ISD::TRUNCATE) {
5502 return DAG.getNode(ISD::TRUNCATE, SDLoc(N), VT, TruncOp);
5509 N0.getOperand(0).getOpcode() == ISD::TRUNCATE &&
5517 X = DAG.getNode(ISD::TRUNCATE, SDLoc(N), VT, X);
5525 // fold (aext (load x)) -> (aext (truncate (extload x)))
5544 SDValue Trunc = DAG.getNode(ISD::TRUNCATE, SDLoc(N0),
5553 // fold (aext (zextload x)) -> (aext (truncate (zextload x)))
5554 // fold (aext (sextload x)) -> (aext (truncate (sextload x)))
5555 // fold (aext ( extload x)) -> (aext (truncate (extload x)))
5568 DAG.getNode(ISD::TRUNCATE, SDLoc(N0),
5578 // aext(setcc) -> truncate(vsetcc)
5594 // truncate/any extend
5731 // we can fold the truncate through the shift.
5962 // noop truncate
5965 // fold (truncate c1) -> c1
5967 return DAG.getNode(ISD::TRUNCATE, SDLoc(N), VT, N0);
5968 // fold (truncate (truncate x)) -> (truncate x)
5969 if (N0.getOpcode() == ISD::TRUNCATE)
5970 return DAG.getNode(ISD::TRUNCATE, SDLoc(N), VT, N0.getOperand(0));
5971 // fold (truncate (ext x)) -> (ext x) or (truncate x) or x
5980 // if the source is larger than the dest, than we just need the truncate
5981 return DAG.getNode(ISD::TRUNCATE, SDLoc(N), VT, N0.getOperand(0));
5983 // and the truncate.
5989 // i32 y = TRUNCATE(i64 x)
6025 // Fold a series of buildvector, bitcast, and truncate if possible.
6056 // See if we can simplify the input to this truncate through knowledge that
6066 return DAG.getNode(ISD::TRUNCATE, SDLoc(N), VT, Shorter);
6068 // fold (truncate (load x)) -> (smaller load x)
6069 // fold (truncate (srl (load x), c)) -> (smaller load (x+c/evtbits))
6123 SDValue NV = DAG.getNode(ISD::TRUNCATE, SDLoc(V), VTs[i], V);
6285 // If X has a different width than the result/lhs, sext it or truncate it.
6297 X = DAG.getNode(ISD::TRUNCATE, SDLoc(X), VT, X);
6363 Op = DAG.getNode(ISD::TRUNCATE, SDLoc(BV), SrcEltVT, Op);
7381 ((N1.getOpcode() == ISD::TRUNCATE && N1.hasOneUse()) &&
7385 if (N1.getOpcode() == ISD::TRUNCATE) {
7386 // Look pass the truncate.
7431 // Truncate is dead.
8107 /// truncate. This method allows to grow the cost of the original
8110 // Each slice saves a truncate.
8160 // truncate instruction.
8548 // At this point, User is a Truncate, iff we encountered, trunc or
8550 if (User->getOpcode() != ISD::TRUNCATE)
8731 // Truncate down to the new size.
8732 IVal = DAG.getNode(ISD::TRUNCATE, SDLoc(IVal), VT, IVal);
9679 if ((Value.getOpcode() == ISD::FP_ROUND || Value.getOpcode() == ISD::TRUNCATE)
9774 DAG.getNode(ISD::TRUNCATE, dl, OpVT, InVal);
9844 Load = DAG.getNode(ISD::TRUNCATE, SDLoc(EVE), ResultVT, Load);
9870 // SCALAR_TO_VECTOR may truncate the inserted element and the
10397 // operand types. Get the smaller type and truncate all operands to it.
10400 Opnds.push_back(DAG.getNode(ISD::TRUNCATE, SDLoc(N), MinTy,
10403 Opnds.push_back(DAG.getNode(ISD::TRUNCATE, SDLoc(N), MinTy,
10884 // Truncate one of the operands to make them match.
10886 RHSOp = DAG.getNode(ISD::TRUNCATE, SDLoc(N), VT, RHSOp);
10888 LHSOp = DAG.getNode(ISD::TRUNCATE, SDLoc(N), RVT, LHSOp);
11223 Shift = DAG.getNode(ISD::TRUNCATE, DL, AType, Shift);
11237 Shift = DAG.getNode(ISD::TRUNCATE, DL, AType, Shift);