Formatting in DAGCombiner. NFC

llvm-svn: 294091
This commit is contained in:
Amaury Sechet 2017-02-04 13:01:53 +00:00
parent c7db0d0e75
commit 6e2d8e49ec
1 changed files with 2 additions and 0 deletions

View File

@ -7778,6 +7778,7 @@ SDValue DAGCombiner::visitTRUNCATE(SDNode *N) {
VT.getSizeInBits())))
return DAG.getNode(ISD::TRUNCATE, SDLoc(N), VT, Shorter);
}
// fold (truncate (load x)) -> (smaller load x)
// fold (truncate (srl (load x), c)) -> (smaller load (x+c/evtbits))
if (!LegalTypes || TLI.isTypeDesirableForOp(N0.getOpcode(), VT)) {
@ -7799,6 +7800,7 @@ SDValue DAGCombiner::visitTRUNCATE(SDNode *N) {
}
}
}
// fold (trunc (concat ... x ...)) -> (concat ..., (trunc x), ...)),
// where ... are all 'undef'.
if (N0.getOpcode() == ISD::CONCAT_VECTORS && !LegalTypes) {