summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-02-23 01:37:39 +0000
committerChris Lattner <sabre@nondot.org>2010-02-23 01:37:39 +0000
commit22bc26e4cf77fc383cf8fcdc3c712a2626380539 (patch)
tree0f1e8e7d28c17bf4d4e2db43567e08a0b17765f5 /llvm/lib
parent075056a8f975d0b9d1c5fe69ee01ddd83604fb4d (diff)
downloadbcm5719-llvm-22bc26e4cf77fc383cf8fcdc3c712a2626380539.tar.gz
bcm5719-llvm-22bc26e4cf77fc383cf8fcdc3c712a2626380539.zip
fix hte last cellspu failure.
llvm-svn: 96854
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/CellSPU/SPUISelDAGToDAG.cpp23
1 files changed, 12 insertions, 11 deletions
diff --git a/llvm/lib/Target/CellSPU/SPUISelDAGToDAG.cpp b/llvm/lib/Target/CellSPU/SPUISelDAGToDAG.cpp
index 64a49feab73..2d1a7006c34 100644
--- a/llvm/lib/Target/CellSPU/SPUISelDAGToDAG.cpp
+++ b/llvm/lib/Target/CellSPU/SPUISelDAGToDAG.cpp
@@ -767,21 +767,22 @@ SPUDAGToDAGISel::Select(SDNode *N) {
}
SDNode *shufMaskLoad = emitBuildVector(shufMask.getNode());
- SDNode *PromoteScalar = CurDAG->getNode(SPUISD::PREFSLOT2VEC, dl,
- Op0VecVT, Op0).getNode();
-
+
+ HandleSDNode PromoteScalar(CurDAG->getNode(SPUISD::PREFSLOT2VEC, dl,
+ Op0VecVT, Op0));
+
+ SDValue PromScalar;
+ if (SDNode *N = SelectCode(PromoteScalar.getValue().getNode()))
+ PromScalar = SDValue(N, 0);
+ else
+ PromScalar = PromoteScalar.getValue();
+
SDValue zextShuffle =
CurDAG->getNode(SPUISD::SHUFB, dl, OpVecVT,
- SDValue(PromoteScalar, 0),
- SDValue(PromoteScalar, 0),
+ PromScalar, PromScalar,
SDValue(shufMaskLoad, 0));
- // N.B.: BIT_CONVERT replaces and updates the zextShuffle node, so we
- // re-use it in the VEC2PREFSLOT selection without needing to explicitly
- // call SelectCode (it's already done for us.)
- HandleSDNode Dummy2(zextShuffle); //CurDAG->getNode(ISD::BIT_CONVERT, dl, OpVecVT,
- // zextShuffle));
-
+ HandleSDNode Dummy2(zextShuffle);
if (SDNode *N = SelectCode(Dummy2.getValue().getNode()))
return N;
HandleSDNode Dummy(CurDAG->getNode(SPUISD::VEC2PREFSLOT, dl, OpVT,
OpenPOWER on IntegriCloud