Page MenuHomePhabricator

[PATCH] When pragma FENV_ACCESS is ignored do not modify Sema.CurFPFeatures

Authored by mibintc on May 6 2020, 11:53 AM.



Bug reported by @uabelho against
pragma STDC FENV_ACCESS ON is ignored, but the floating point state maintained in Sema.CurFPFeatures was modified to show that
fenv_access was enabled, this caused llvm constrained intrinsics to be created which is erroneous. This is a small patch to avoid modifying the state.

Diff Detail

Event Timeline

mibintc created this revision.May 6 2020, 11:53 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 6 2020, 11:54 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
mibintc marked 2 inline comments as done.May 6 2020, 11:56 AM
mibintc added inline comments.

Modified this to return instead of making changes which will ultimately modify the floating point state


I used a modified version of @uabelho 's test. I verified that before this bug fix a constrained intrinsic was being created for this multiply.

This revision is now accepted and ready to land.May 6 2020, 12:53 PM
This revision was automatically updated to reflect the committed changes.

Great! Thanks!