[PATCH] D91845: [PowerPC] Fix FLT_ROUNDS_ on little endian

Qing Shan Zhang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 1 21:16:49 PST 2020


steven.zhang added inline comments.


================
Comment at: llvm/lib/Target/PowerPC/PPCISelLowering.cpp:8942
+  SDValue CWD;
+  if (Subtarget.isPPC64()) {
+    CWD = DAG.getNode(ISD::TRUNCATE, dl, MVT::i32,
----------------
Is it better to check the type legal for i64 ? We cannot do this for PPC32 is because that, the i64 is not legal and we are not allowed to produce the illegal type during legalizeOp.


================
Comment at: llvm/lib/Target/PowerPC/PPCISelLowering.cpp:8946
+  } else {
+    // Save FP register to stack slot
+    int SSFI = MF.getFrameInfo().CreateStackObject(8, Align(8), false);
----------------
Add an assertion here:
assert(hasBigEndianPartOrdering(...))


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D91845/new/

https://reviews.llvm.org/D91845



More information about the llvm-commits mailing list