This change removes dependency on pgmath mod, and also allows
Fortran runtime to issue a diagnostic message in case of zero
denominator.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Looks good to me
flang/lib/Optimizer/Builder/Runtime/Numeric.cpp | ||
---|---|---|
311 | Isn't it safe to upcast the arguments to use the ModReal4 version and to downcast the result in those cases ? |
flang/lib/Optimizer/Builder/Runtime/Numeric.cpp | ||
---|---|---|
311 | That's risky, since there would be an extra rounding, and MOD should be exact. It's possible to check the whole range of 16-bit operand value pairs for safety. |
Isn't it safe to upcast the arguments to use the ModReal4 version and to downcast the result in those cases ?