Skip to content

Conversation

@syvb
Copy link
Contributor

@syvb syvb commented May 2, 2021

Calling these intrinsics with non-finite values is undefined behaviour, since they result in f* intrinsics in LLVM with the fast flag, and fast math on non-finite values results in poison values. (technically LLVM only considers it UB upon using the value, but that shouldn't make much of a difference)

@RalfJung
Copy link
Member

RalfJung commented May 3, 2021

Good catch! Yes I agree this makes sense.
Could you make at least one of the tests pass ::INF instead of ::NAN to ensure we also catch that kind if non-finite value?

@RalfJung
Copy link
Member

RalfJung commented May 3, 2021

Looking great, thanks. :)
@bors r+

@bors
Copy link
Contributor

bors commented May 3, 2021

📌 Commit e0e59f6 has been approved by RalfJung

@bors
Copy link
Contributor

bors commented May 3, 2021

⌛ Testing commit e0e59f6 with merge bdce1dd...

@bors
Copy link
Contributor

bors commented May 3, 2021

☀️ Test successful - checks-actions
Approved by: RalfJung
Pushing bdce1dd to master...

@bors bors merged commit bdce1dd into rust-lang:master May 3, 2021
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

Successfully merging this pull request may close these issues.

3 participants