Skip to content

Conversation

@eeckstein
Copy link
Contributor

Only if the other operand of an comparison with Inf is a literal we can be sure that it's not Inf or NaN.

Fixes a miscompile
rdar://122605966

@eeckstein
Copy link
Contributor Author

@swift-ci test

Only if the other operand of a comparison with Inf is a literal we can be sure that it's not Inf or NaN.

Fixes a miscompile
rdar://122605966
@eeckstein
Copy link
Contributor Author

@swift-ci test

@tbkka
Copy link
Contributor

tbkka commented Feb 14, 2024

CC: @jkshtj Looks like #69828 was somewhat over-eager. It caused float + 0 < infinity to always evaluate true, among other problems.

@jkshtj
Copy link
Contributor

jkshtj commented Feb 14, 2024

CC: @jkshtj Looks like #69828 was somewhat over-eager. It caused float + 0 < infinity to always evaluate true, among other problems.

Sorry for the oversight on my part! Thank you for letting me know.

@eeckstein eeckstein merged commit 823db1f into swiftlang:main Feb 15, 2024
@eeckstein eeckstein deleted the fix-const-folding branch February 15, 2024 09:06
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.

4 participants