[PATCH] D86595: [PowerPC] Handle STRICT_FSETCC(S) in more cases

Ulrich Weigand via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 26 08:48:34 PDT 2020


uweigand requested changes to this revision.
uweigand added inline comments.
This revision now requires changes to proceed.


================
Comment at: llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp:4176
   unsigned Idx = getCRIdxForSetCC(CC, Inv);
   SDValue CCReg = SelectCC(LHS, RHS, CC, dl);
   SDValue IntCR;
----------------
This is wrong for strict mode.  You'll need to create a strict version of SELECT_CC here, and this needs to handle the (incoming and outgoing) chain.


================
Comment at: llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp:4199
+    if (IsStrict)
+      CurDAG->SelectNodeTo(N, PPC::RLWINM, MVT::i32, MVT::Other, Ops);
+    else
----------------
This doesn't make sense - the RLWINM instruction does not actually have two outputs.  Again, the outgoing chain needs to be processed by the strict SELECT_CC above.   The RLWINM (as a pure integer operation) only creates the integer output.  It can be merged back with the chain from above using e.g. MERGE_VALUES here.


================
Comment at: llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp:4210
+    CurDAG->SelectNodeTo(N, PPC::XORI, MVT::i32, MVT::Other, Tmp,
+                         getI32Imm(1, dl));
+  else
----------------
Same comment as above.


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

https://reviews.llvm.org/D86595



More information about the llvm-commits mailing list