aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/ARM/ARMISelLowering.cpp
diff options
context:
space:
mode:
authorBob Wilson <bob.wilson@apple.com>2009-10-13 21:55:24 +0000
committerBob Wilson <bob.wilson@apple.com>2009-10-13 21:55:24 +0000
commit73d64a6fd3294b2b265d4ca7b5c9f76989459fb7 (patch)
tree8bfc39f99243b7010c3323a544c4108acdebf43f /lib/Target/ARM/ARMISelLowering.cpp
parent1bf5ebc7be0d5b05e4175c7adb767b38896adef1 (diff)
downloadexternal_llvm-73d64a6fd3294b2b265d4ca7b5c9f76989459fb7.zip
external_llvm-73d64a6fd3294b2b265d4ca7b5c9f76989459fb7.tar.gz
external_llvm-73d64a6fd3294b2b265d4ca7b5c9f76989459fb7.tar.bz2
NEON VLD/VST are now fully implemented. For operations that expand to
multiple instructions, the expansion is done during selection so there is no need to do anything special during legalization. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84036 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/ARMISelLowering.cpp')
-rw-r--r--lib/Target/ARM/ARMISelLowering.cpp50
1 files changed, 2 insertions, 48 deletions
diff --git a/lib/Target/ARM/ARMISelLowering.cpp b/lib/Target/ARM/ARMISelLowering.cpp
index cd89c07..65df4b3 100644
--- a/lib/Target/ARM/ARMISelLowering.cpp
+++ b/lib/Target/ARM/ARMISelLowering.cpp
@@ -1369,44 +1369,11 @@ SDValue ARMTargetLowering::LowerGLOBAL_OFFSET_TABLE(SDValue Op,
return DAG.getNode(ARMISD::PIC_ADD, dl, PtrVT, Result, PICLabel);
}
-static SDValue LowerNeonVLDIntrinsic(SDValue Op, SelectionDAG &DAG,
- unsigned NumVecs) {
- SDNode *Node = Op.getNode();
- EVT VT = Node->getValueType(0);
-
- // No expansion needed for 64-bit vectors.
- if (VT.is64BitVector())
- return SDValue();
-
- // FIXME: We need to expand VLD3 and VLD4 of 128-bit vectors into separate
- // operations to load the even and odd registers.
- return SDValue();
-}
-
-static SDValue LowerNeonVSTIntrinsic(SDValue Op, SelectionDAG &DAG,
- unsigned NumVecs) {
- SDNode *Node = Op.getNode();
- EVT VT = Node->getOperand(3).getValueType();
-
- // No expansion needed for 64-bit vectors.
- if (VT.is64BitVector())
- return SDValue();
-
- // FIXME: We need to expand VST3 and VST4 of 128-bit vectors into separate
- // operations to store the even and odd registers.
- return SDValue();
-}
-
static SDValue LowerNeonVLDLaneIntrinsic(SDValue Op, SelectionDAG &DAG,
unsigned NumVecs) {
- SDNode *Node = Op.getNode();
- EVT VT = Node->getValueType(0);
-
- if (!VT.is64BitVector())
- return SDValue(); // unimplemented
-
// Change the lane number operand to be a TargetConstant; otherwise it
// will be legalized into a register.
+ SDNode *Node = Op.getNode();
ConstantSDNode *Lane = dyn_cast<ConstantSDNode>(Node->getOperand(NumVecs+3));
if (!Lane) {
assert(false && "vld lane number must be a constant");
@@ -1419,14 +1386,9 @@ static SDValue LowerNeonVLDLaneIntrinsic(SDValue Op, SelectionDAG &DAG,
static SDValue LowerNeonVSTLaneIntrinsic(SDValue Op, SelectionDAG &DAG,
unsigned NumVecs) {
- SDNode *Node = Op.getNode();
- EVT VT = Node->getOperand(3).getValueType();
-
- if (!VT.is64BitVector())
- return SDValue(); // unimplemented
-
// Change the lane number operand to be a TargetConstant; otherwise it
// will be legalized into a register.
+ SDNode *Node = Op.getNode();
ConstantSDNode *Lane = dyn_cast<ConstantSDNode>(Node->getOperand(NumVecs+3));
if (!Lane) {
assert(false && "vst lane number must be a constant");
@@ -1441,20 +1403,12 @@ SDValue
ARMTargetLowering::LowerINTRINSIC_W_CHAIN(SDValue Op, SelectionDAG &DAG) {
unsigned IntNo = cast<ConstantSDNode>(Op.getOperand(1))->getZExtValue();
switch (IntNo) {
- case Intrinsic::arm_neon_vld3:
- return LowerNeonVLDIntrinsic(Op, DAG, 3);
- case Intrinsic::arm_neon_vld4:
- return LowerNeonVLDIntrinsic(Op, DAG, 4);
case Intrinsic::arm_neon_vld2lane:
return LowerNeonVLDLaneIntrinsic(Op, DAG, 2);
case Intrinsic::arm_neon_vld3lane:
return LowerNeonVLDLaneIntrinsic(Op, DAG, 3);
case Intrinsic::arm_neon_vld4lane:
return LowerNeonVLDLaneIntrinsic(Op, DAG, 4);
- case Intrinsic::arm_neon_vst3:
- return LowerNeonVSTIntrinsic(Op, DAG, 3);
- case Intrinsic::arm_neon_vst4:
- return LowerNeonVSTIntrinsic(Op, DAG, 4);
case Intrinsic::arm_neon_vst2lane:
return LowerNeonVSTLaneIntrinsic(Op, DAG, 2);
case Intrinsic::arm_neon_vst3lane: