bjope added inline comments.

================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp:581
                                    RTLIB::POWI_F128,
                                    RTLIB::POWI_PPCF128);
   if (!TLI.getLibcallName(LC)) {
----------------
efriedma wrote:
> This is missing a diagnostic for the exponent.  We don't want to silently 
> miscompile if someone uses an exponent that isn't supported by the target.
Not sure exactly what you suggest. Is that a general comment for all places in 
SelectionDAG where we may emit calls to RTLIB::POWI or what makes this 
SoftenFloatRes special?

If we end up using mismatching types in the call, wouldn't that being detected 
as ICE elsewhere? Only reason I made changes to this function in the first 
place was due to the historical assert above regarding the type of the exponent 
in FPOWI. Maybe I should just drop that assert instead? This is the only place 
where that is checked, but I figure that the SoftenFloatRes legalization is 
just one out of many places where FPOWI is legalized and lowered into libcalls 
to RTLIB::POWI.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D99439

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to