Add a comment to describe why vector shuffles are legalized to custom DAG nodes.

llvm-svn: 78884
This commit is contained in:
Bob Wilson 2009-08-13 02:13:04 +00:00
parent d0cfa88785
commit c6800b55e6
1 changed files with 4 additions and 0 deletions

View File

@ -2439,6 +2439,10 @@ static SDValue LowerVECTOR_SHUFFLE(SDValue Op, SelectionDAG &DAG) {
DebugLoc dl = Op.getDebugLoc();
EVT VT = Op.getValueType();
// Convert shuffles that are directly supported on NEON to target-specific
// DAG nodes, instead of keeping them as shuffles and matching them again
// during code selection. This is more efficient and avoids the possibility
// of inconsistencies between legalization and selection.
if (SVN->isSplat() && SVN->getSplatIndex() == 0)
return DAG.getNode(ARMISD::VSPLAT0, dl, VT, SVN->getOperand(0));
if (isVREVMask(SVN, 64))