[PATCH] D81918: [PowerPC] Support lowering int-to-fp on ppc_fp128

Ulrich Weigand via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 13 06:00:43 PDT 2020


uweigand added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp:1685
   Lo = DAG.getSelectCC(dl, Src, DAG.getConstant(0, dl, SrcVT),
                        Lo, Hi, ISD::SETLT);
   GetPairElements(Lo, Lo, Hi);
----------------
qiucf wrote:
> uweigand wrote:
> > OK, well, even if we keep the existing algorithm with the FIXME, this still isn't correct as it loses the Chain after the FADD.   I think in the strict case we'll need to use a strict version of SelectCC (passing in the Chain from the FADD) and the use the resulting output Chain for the overall output (via ReplaceValueWith as above -- in fact, if we fall through down here, we actually should *not* do the ReplaceValueWith above, since that would be the wrong chain).
> Seems we don't have strict `select_cc`. Here `Src` is integer type, not suitable for `fsetcc+select`?
> 
> And yes, I should replace original chain of N with newest chain, both here and inside `isSigned` if block.
Ah, you're right -- this is an integer select, so there is no (need for a) strict version.

So the only change needed is to do the chain replacement here, and inside the isSigned block (as you said).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D81918



More information about the llvm-commits mailing list