From 6b76b96c69334f3b6a2a895ff810ed047b4b75e5 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 27 Jun 2006 20:46:17 +0000 Subject: [PATCH] Fix ppc64 jump tables git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28941 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/PowerPC/PPCISelDAGToDAG.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Target/PowerPC/PPCISelDAGToDAG.cpp b/lib/Target/PowerPC/PPCISelDAGToDAG.cpp index 5bf1649a9bd..da1de9a8f9d 100644 --- a/lib/Target/PowerPC/PPCISelDAGToDAG.cpp +++ b/lib/Target/PowerPC/PPCISelDAGToDAG.cpp @@ -1173,7 +1173,8 @@ void PPCDAGToDAGISel::Select(SDOperand &Result, SDOperand Op) { SDOperand Chain, Target; Select(Chain, N->getOperand(0)); Select(Target,N->getOperand(1)); - Chain = SDOperand(CurDAG->getTargetNode(PPC::MTCTR, MVT::Other, Target, + unsigned Opc = Target.getValueType() == MVT::i32 ? PPC::MTCTR : PPC::MTCTR8; + Chain = SDOperand(CurDAG->getTargetNode(Opc, MVT::Other, Target, Chain), 0); Result = CurDAG->SelectNodeTo(N, PPC::BCTR, MVT::Other, Chain); return; -- 2.34.1