summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorBob Wilson <bob.wilson@apple.com>2009-08-13 02:13:04 +0000
committerBob Wilson <bob.wilson@apple.com>2009-08-13 02:13:04 +0000
commitc6800b55e694b5953eaca25d826d5efd661aa37f (patch)
tree5db53b013e18b6bbe08f7894935c9393e485b8ac /llvm
parentd0cfa88785cf951f0b049e87870965a268de139e (diff)
downloadbcm5719-llvm-c6800b55e694b5953eaca25d826d5efd661aa37f.tar.gz
bcm5719-llvm-c6800b55e694b5953eaca25d826d5efd661aa37f.zip
Add a comment to describe why vector shuffles are legalized to custom DAG nodes.
llvm-svn: 78884
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/Target/ARM/ARMISelLowering.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Target/ARM/ARMISelLowering.cpp b/llvm/lib/Target/ARM/ARMISelLowering.cpp
index 4074fc7f219..785a7ded6d3 100644
--- a/llvm/lib/Target/ARM/ARMISelLowering.cpp
+++ b/llvm/lib/Target/ARM/ARMISelLowering.cpp
@@ -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))
OpenPOWER on IntegriCloud