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

Unhandled experimental intrinsics crash SMACK #795

Open
keram88 opened this issue Mar 17, 2023 · 0 comments
Open

Unhandled experimental intrinsics crash SMACK #795

keram88 opened this issue Mar 17, 2023 · 0 comments

Comments

@keram88
Copy link
Contributor

keram88 commented Mar 17, 2023

Hello,

The following program causes unhandled intrinsic instructions to be emitted by Clang in LLVM:

int main() {
#pragma STDC FENV_ACCESS ON
  2.0f*1.0f;
}

(The FENV_ACCESS directive is meant to inhibit the ability of the optimizer's ability to optimize code related to accessing the floating point environment, such as rounding and exceptions).
This program produces the following unhandled intrinsic instruction: @llvm.experimental.constrained.fdiv.f32. However, there are more related instructions which also crash SMACK of the form @llvm.experimental.constrained.*. For instance, adding 2*1.0f produces these intrinsic instructions: @llvm.experimental.constrained.sitofp.f32.i32 and @llvm.experimental.constrained.fmul.f32.

A full list can be found here: https://llvm.org/docs/LangRef.html#constrained-floating-point-intrinsics

Since smack doesn't currently model floating point exceptions, we should probably raise a warning that these instructions are not supported and the verification could be unsound.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant