forked from OSchip/llvm-project
parent
8f2906a2e8
commit
3f17aee94b
|
@ -1702,7 +1702,7 @@ SDValue ARMTargetLowering::LowerBR_JT(SDValue Op, SelectionDAG &DAG) {
|
||||||
MVT PTy = getPointerTy();
|
MVT PTy = getPointerTy();
|
||||||
JumpTableSDNode *JT = cast<JumpTableSDNode>(Table);
|
JumpTableSDNode *JT = cast<JumpTableSDNode>(Table);
|
||||||
ARMFunctionInfo *AFI = DAG.getMachineFunction().getInfo<ARMFunctionInfo>();
|
ARMFunctionInfo *AFI = DAG.getMachineFunction().getInfo<ARMFunctionInfo>();
|
||||||
SDValue UId = DAG.getConstant(AFI->createJumpTableUId(), PTy);
|
SDValue UId = DAG.getConstant(AFI->createJumpTableUId(), PTy);
|
||||||
SDValue JTI = DAG.getTargetJumpTable(JT->getIndex(), PTy);
|
SDValue JTI = DAG.getTargetJumpTable(JT->getIndex(), PTy);
|
||||||
Table = DAG.getNode(ARMISD::WrapperJT, dl, MVT::i32, JTI, UId);
|
Table = DAG.getNode(ARMISD::WrapperJT, dl, MVT::i32, JTI, UId);
|
||||||
Index = DAG.getNode(ISD::MUL, dl, PTy, Index, DAG.getConstant(4, PTy));
|
Index = DAG.getNode(ISD::MUL, dl, PTy, Index, DAG.getConstant(4, PTy));
|
||||||
|
|
Loading…
Reference in New Issue