Lines Matching refs:TRUNCATE
720 SDValue Trunc = DAG.getNode(ISD::TRUNCATE, dl, VT, SDValue(ExtLoad, 0));
858 return DAG.getNode(ISD::TRUNCATE, dl, VT,
905 return DAG.getNode(ISD::TRUNCATE, dl, VT,
973 SDValue Result = DAG.getNode(ISD::TRUNCATE, dl, VT, NewLD);
1146 case ISD::TRUNCATE: return visitTRUNCATE(N);
2166 return DAG.getNode(ISD::TRUNCATE, DL, VT, N1);
2202 return DAG.getNode(ISD::TRUNCATE, DL, VT, N1);
2285 Hi = DAG.getNode(ISD::TRUNCATE, DL, VT, Hi);
2287 Lo = DAG.getNode(ISD::TRUNCATE, DL, VT, Lo);
2315 Hi = DAG.getNode(ISD::TRUNCATE, DL, VT, Hi);
2317 Lo = DAG.getNode(ISD::TRUNCATE, DL, VT, Lo);
2383 (N0.getOpcode() == ISD::TRUNCATE &&
3368 // Look for sign/zext/any-extended or truncate cases:
3372 LHSShiftAmt.getOpcode() == ISD::TRUNCATE) &&
3376 RHSShiftAmt.getOpcode() == ISD::TRUNCATE)) {
3643 if (N1.getOpcode() == ISD::TRUNCATE &&
3654 DAG.getNode(ISD::TRUNCATE,
3795 // If truncate is free for the target sext(shl) is likely to result in better
3801 // Determine what the truncate's result bitsize and type would be.
3810 // on that type, and the truncate to that type is both legal and free,
3814 TLI.isOperationLegalOrCustom(ISD::TRUNCATE, VT) &&
3821 SDValue Trunc = DAG.getNode(ISD::TRUNCATE, SDLoc(N0), TruncVT,
3830 if (N1.getOpcode() == ISD::TRUNCATE &&
3842 DAG.getNode(ISD::TRUNCATE,
3851 if (N0.getOpcode() == ISD::TRUNCATE &&
3868 return DAG.getNode(ISD::TRUNCATE, SDLoc(N), VT, SRA);
3927 if (N1C && N0.getOpcode() == ISD::TRUNCATE &&
3940 return DAG.getNode(ISD::TRUNCATE, SDLoc(N0), VT,
4018 if (N1.getOpcode() == ISD::TRUNCATE &&
4030 DAG.getNode(ISD::TRUNCATE,
4074 else if (Use->getOpcode() == ISD::TRUNCATE && Use->hasOneUse()) {
4075 // Also look pass the truncate.
4173 return DAG.getNode(ISD::TRUNCATE, SDLoc(N), VT, XORNode);
4307 // "fold ({s|z|a}ext (load x)) -> ({s|z|a}ext (truncate ({s|z|a}extload x)))"
4406 if (N0.getOpcode() == ISD::TRUNCATE) {
4407 // fold (sext (truncate (load x))) -> (sext (smaller load x))
4408 // fold (sext (truncate (srl (load x), c))) -> (sext (smaller load (x+c/n)))
4414 // CombineTo deleted the truncate, if needed, but not what's under it.
4440 // bits, just truncate to i32.
4442 return DAG.getNode(ISD::TRUNCATE, SDLoc(N), VT, Op);
4445 // fold (sext (truncate x)) -> (sextinreg x).
4451 Op = DAG.getNode(ISD::TRUNCATE, SDLoc(N0), VT, Op);
4457 // fold (sext (load x)) -> (sext (truncate (sextload x)))
4477 SDValue Trunc = DAG.getNode(ISD::TRUNCATE, SDLoc(N0),
4486 // fold (sext (sextload x)) -> (sext (truncate (sextload x)))
4487 // fold (sext ( extload x)) -> (sext (truncate (sextload x)))
4502 DAG.getNode(ISD::TRUNCATE, SDLoc(N0),
4536 SDValue Trunc = DAG.getNode(ISD::TRUNCATE,
4572 // truncate/sign extend
4611 // isTruncateOf - If N is a truncate of some other value, return true, record
4618 if (N->getOpcode() == ISD::TRUNCATE) {
4662 // fold (zext (truncate x)) -> (zext x) or
4663 // (zext (truncate x)) -> (truncate x)
4680 return DAG.getNode(ISD::TRUNCATE, SDLoc(N), VT, Op);
4686 // fold (zext (truncate (load x))) -> (zext (smaller load x))
4687 // fold (zext (truncate (srl (load x), c))) -> (zext (small load (x+c/n)))
4688 if (N0.getOpcode() == ISD::TRUNCATE) {
4694 // CombineTo deleted the truncate, if needed, but not what's under it.
4701 // fold (zext (truncate x)) -> (and x, mask)
4702 if (N0.getOpcode() == ISD::TRUNCATE &&
4705 // fold (zext (truncate (load x))) -> (zext (smaller load x))
4706 // fold (zext (truncate (srl (load x), c))) -> (zext (smaller load (x+c/n)))
4712 // CombineTo deleted the truncate, if needed, but not what's under it.
4723 Op = DAG.getNode(ISD::TRUNCATE, SDLoc(N), VT, Op);
4733 N0.getOperand(0).getOpcode() == ISD::TRUNCATE &&
4742 X = DAG.getNode(ISD::TRUNCATE, SDLoc(X), VT, X);
4750 // fold (zext (load x)) -> (zext (truncate (zextload x)))
4770 SDValue Trunc = DAG.getNode(ISD::TRUNCATE, SDLoc(N0),
4807 SDValue Trunc = DAG.getNode(ISD::TRUNCATE,
4819 // fold (zext (zextload x)) -> (zext (truncate (zextload x)))
4820 // fold (zext ( extload x)) -> (zext (truncate (zextload x)))
4835 DAG.getNode(ISD::TRUNCATE, SDLoc(N0), N0.getValueType(),
4865 // truncate/sign extend
4936 // fold (aext (truncate (load x))) -> (aext (smaller load x))
4937 // fold (aext (truncate (srl (load x), c))) -> (aext (small load (x+c/n)))
4938 if (N0.getOpcode() == ISD::TRUNCATE) {
4944 // CombineTo deleted the truncate, if needed, but not what's under it.
4951 // fold (aext (truncate x))
4952 if (N0.getOpcode() == ISD::TRUNCATE) {
4957 return DAG.getNode(ISD::TRUNCATE, SDLoc(N), VT, TruncOp);
4964 N0.getOperand(0).getOpcode() == ISD::TRUNCATE &&
4972 X = DAG.getNode(ISD::TRUNCATE, SDLoc(N), VT, X);
4980 // fold (aext (load x)) -> (aext (truncate (extload x)))
5000 SDValue Trunc = DAG.getNode(ISD::TRUNCATE, SDLoc(N0),
5009 // fold (aext (zextload x)) -> (aext (truncate (zextload x)))
5010 // fold (aext (sextload x)) -> (aext (truncate (sextload x)))
5011 // fold (aext ( extload x)) -> (aext (truncate (extload x)))
5024 DAG.getNode(ISD::TRUNCATE, SDLoc(N0),
5046 // truncate/sign extend
5188 // we can fold the truncate through the shift.
5400 // noop truncate
5403 // fold (truncate c1) -> c1
5405 return DAG.getNode(ISD::TRUNCATE, SDLoc(N), VT, N0);
5406 // fold (truncate (truncate x)) -> (truncate x)
5407 if (N0.getOpcode() == ISD::TRUNCATE)
5408 return DAG.getNode(ISD::TRUNCATE, SDLoc(N), VT, N0.getOperand(0));
5409 // fold (truncate (ext x)) -> (ext x) or (truncate x) or x
5418 // if the source is larger than the dest, than we just need the truncate
5419 return DAG.getNode(ISD::TRUNCATE, SDLoc(N), VT, N0.getOperand(0));
5421 // and the truncate.
5427 // i32 y = TRUNCATE(i64 x)
5463 // Fold a series of buildvector, bitcast, and truncate if possible.
5495 // See if we can simplify the input to this truncate through knowledge that
5505 return DAG.getNode(ISD::TRUNCATE, SDLoc(N), VT, Shorter);
5507 // fold (truncate (load x)) -> (smaller load x)
5508 // fold (truncate (srl (load x), c)) -> (smaller load (x+c/evtbits))
5548 SDValue NV = DAG.getNode(ISD::TRUNCATE, SDLoc(V), VTs[i], V);
5714 // If X has a different width than the result/lhs, sext it or truncate it.
5726 X = DAG.getNode(ISD::TRUNCATE, SDLoc(X), VT, X);
5792 Op = DAG.getNode(ISD::TRUNCATE, SDLoc(BV), SrcEltVT, Op);
6818 ((N1.getOpcode() == ISD::TRUNCATE && N1.hasOneUse()) &&
6822 if (N1.getOpcode() == ISD::TRUNCATE) {
6823 // Look pass the truncate.
6868 // Truncate is dead.
7626 // Truncate down to the new size.
7627 IVal = DAG.getNode(ISD::TRUNCATE, SDLoc(IVal), VT, IVal);
8559 if ((Value.getOpcode() == ISD::FP_ROUND || Value.getOpcode() == ISD::TRUNCATE)
8635 DAG.getNode(ISD::TRUNCATE, dl, OpVT, InVal);
8652 // SCALAR_TO_VECTOR may truncate the inserted element and the
8833 Load = DAG.getNode(ISD::TRUNCATE, SDLoc(N), NVT, Load);
9567 // Truncate one of the operands to make them match.
9569 RHSOp = DAG.getNode(ISD::TRUNCATE, SDLoc(N), VT, RHSOp);
9571 LHSOp = DAG.getNode(ISD::TRUNCATE, SDLoc(N), RVT, LHSOp);
9885 Shift = DAG.getNode(ISD::TRUNCATE, DL, AType, Shift);
9899 Shift = DAG.getNode(ISD::TRUNCATE, DL, AType, Shift);