[PATCH] D63782: [FPEnv] Add fptosi and fptoui constrained intrinsics
Pengfei Wang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 1 01:56:41 PDT 2019
pengfei added inline comments.
================
Comment at: include/llvm/CodeGen/ISDOpcodes.h:307
+ /// unsigned integer. These have the same semantics as fptosi and fptoui
+ /// in IR. If the FP value cannot fit in the integer type, the results are
+ /// undefined.
----------------
kpn wrote:
> craig.topper wrote:
> > Is this what we want from a strict implementation. "icc -fp-model=strict" goes out of its way to generate an invalid exception when the input type doesn't fit and the hardware can't generate an exception on its own. https://godbolt.org/z/ABU80i
> No, I don't think this is what we want. I'll remove that sentence.
I don't understand the behavior of icc here. SDM says this instruction can raise floating-point invalid exception when the result out of range. Why icc add the code to raise another divz exception?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D63782/new/
https://reviews.llvm.org/D63782
More information about the llvm-commits
mailing list