Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add overrides for llvm.copysign.{f32,f64} #851

Merged
merged 2 commits into from
Sep 15, 2021
Merged

Conversation

RyanGlScott
Copy link
Contributor

LLVM 12 is much more eager to simplify certain expressions to calls to llvm.copysign.f*, as illustrated in #187 (comment). It proves relatively straightforward to just add overrides for the llvm.copysign.f{32,64} instrinsics, so this patch accomplishes just that. The one caveat is that we cannot accurately represent the semantics of llvm.copysign.f* with respect to NaN arguments, since What4 does not possess a way to distinguish the sign bits of NaN values. I decided not to let perfect be the enemy of good, however, so I simply made a note of this limitation in the crucible-llvm/doc/limitations.md file.

Addresses one bullet point in #187.

LLVM 12 is much more eager to simplify certain expressions to calls
to `llvm.copysign.f*`, as illustrated in
#187 (comment).
It proves relatively straightforward to just add overrides for the
`llvm.copysign.f{32,64}` instrinsics, so this patch accomplishes just that.
The one caveat is that we cannot accurately represent the semantics of
`llvm.copysign.f*` with respect to NaN arguments, since What4 does not
possess a way to distinguish the sign bits of NaN values. I decided not to
let perfect be the enemy of good, however, so I simply made a note of this
limitation in the `crucible-llvm/doc/limitations.md` file.

Addresses one bullet point in #187.
The former has effectively replaced the latter, so hopefully using the more
up-to-date one will reduce flakiness when downloading GHC.
@RyanGlScott RyanGlScott merged commit e3b0931 into master Sep 15, 2021
@RyanGlScott RyanGlScott deleted the llvm.copysign branch September 15, 2021 18:06
@RyanGlScott RyanGlScott added the SV-COMP Issues related to making crux eligible to participate in SV-COMP. label Sep 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
SV-COMP Issues related to making crux eligible to participate in SV-COMP.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants