1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 03:02:36 +01:00

[X86] Use correct MachineMemOperand for stack load in LowerFLT_ROUNDS_

This commit is contained in:
Craig Topper 2020-02-26 13:41:00 -08:00
parent c49b54369d
commit 8a31a23654

View File

@ -25643,18 +25643,16 @@ SDValue X86TargetLowering::LowerFLT_ROUNDS_(SDValue Op,
SDValue StackSlot =
DAG.getFrameIndex(SSFI, getPointerTy(DAG.getDataLayout()));
MachineMemOperand *MMO =
MF.getMachineMemOperand(MachinePointerInfo::getFixedStack(MF, SSFI),
MachineMemOperand::MOStore, 2, 2);
MachinePointerInfo MPI = MachinePointerInfo::getFixedStack(MF, SSFI);
SDValue Chain = Op.getOperand(0);
SDValue Ops[] = {Chain, StackSlot};
Chain = DAG.getMemIntrinsicNode(
X86ISD::FNSTCW16m, DL, DAG.getVTList(MVT::Other), Ops, MVT::i16, MMO);
Chain = DAG.getMemIntrinsicNode(X86ISD::FNSTCW16m, DL,
DAG.getVTList(MVT::Other), Ops, MVT::i16, MPI,
2 /*Align*/, MachineMemOperand::MOStore);
// Load FP Control Word from stack slot
SDValue CWD =
DAG.getLoad(MVT::i16, DL, Chain, StackSlot, MachinePointerInfo());
SDValue CWD = DAG.getLoad(MVT::i16, DL, Chain, StackSlot, MPI, 2 /*Align*/);
Chain = CWD.getValue(1);
// Mask and turn the control bits into a shift for the lookup table.