[PATCH] D91845: [PowerPC] Fix FLT_ROUNDS_ on little endian
Qing Shan Zhang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 25 21:53:59 PST 2020
steven.zhang added inline comments.
================
Comment at: llvm/lib/Target/PowerPC/PPCISelLowering.cpp:8899
- // Save FP register to stack slot
- int SSFI = MF.getFrameInfo().CreateStackObject(8, Align(8), false);
- SDValue StackSlot = DAG.getFrameIndex(SSFI, PtrVT);
- Chain = DAG.getStore(Chain, dl, MFFS, StackSlot, MachinePointerInfo());
-
- // Load FP Control Word from low 32 bits of stack slot.
- SDValue Four = DAG.getConstant(4, dl, PtrVT);
- SDValue Addr = DAG.getNode(ISD::ADD, dl, PtrVT, StackSlot, Four);
- SDValue CWD = DAG.getLoad(MVT::i32, dl, Chain, Addr, MachinePointerInfo());
- Chain = CWD.getValue(1);
+ SDValue CWD;
+ if (Subtarget.hasDirectMove()) {
----------------
Can we use some generic node to express this semantic ? So that , we will handle it automatically. i.e.
x = MFFS
y = bitcast f64 to i64
z = trunc y to i32
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D91845/new/
https://reviews.llvm.org/D91845
More information about the llvm-commits
mailing list