[llvm-dev] Reading FP Environment status from IR

raghesh via llvm-dev llvm-dev at lists.llvm.org
Thu May 6 02:25:54 PDT 2021


Hi All,

We would like to prevent certain optimizations (like hoisting an fdiv
instruction) when the application has set the floating point environment
flags using APIs like
feraiseexcept <https://en.cppreference.com/w/cpp/numeric/fenv/feraiseexcept>
 or
if it uses  #pragma STDC FENV_ACCESS
<https://en.cppreference.com/w/cpp/preprocessor/impl>.

Is there any way to know this at LLVM-IR level?

Regards,
Raghesh
------------------------------
Raghesh Aloor
AMD India Pvt. Ltd.
Bengaluru.
------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20210506/c4728b6d/attachment.html>


More information about the llvm-dev mailing list