[PATCH] D106812: [PowerPC] Fix materialization of SP float values on Power10
Victor Huang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 26 15:02:48 PDT 2021
NeHuang accepted this revision.
NeHuang added a comment.
LGTM. Thanks.
================
Comment at: llvm/lib/Target/PowerPC/PPCInstrInfo.td:415
+ APFloatOfN.convert(APFloat::IEEEdouble(), APFloat::rmNearestTiesToEven,
+ &LosesInfo);
uint32_t Hi = (uint32_t)((APFloatOfN.bitcastToAPInt().getZExtValue() &
----------------
nemanjai wrote:
> NeHuang wrote:
> > Do we need to check `LosesInfo` to ensure lossless conversion?
> IIUC It is not possible for a value to be representable in single precision but not double precision. I suppose we can add:
> `assert(!LosesInfo && "conversion from SP to DP loses info?")`
Thanks. Agreed. If we decided not adding the assert, maybe just change the
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D106812/new/
https://reviews.llvm.org/D106812
More information about the llvm-commits
mailing list