JIT: avoid local jtrue assertions involving floating types#94935
JIT: avoid local jtrue assertions involving floating types#94935AndyAyersMS merged 1 commit intodotnet:mainfrom
Conversation
Float relop equality does not imply bitwise equality. So skip making local jtrue assertions about floating types. Contributes to dotnet#93246.
|
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch Issue DetailsFloat relop equality does not imply bitwise equality. So skip making local jtrue assertions about floating types. Contributes to #93246.
|
|
@jakobbotsch PTAL This is also running in a draft PR where cross-block is enabled; see #94689 |
|
|
||
| // Avoid creating local assertions for float types. | ||
| // | ||
| if (optLocalAssertionProp && varTypeIsFloating(op1)) |
There was a problem hiding this comment.
👍.
Just noting we could expand this in the future...
We have some well-defined APIs like IsNaN, IsInfinity, IsFinite, etc. These can all be used to drive other assertions.
Likewise if we know that op2 isn't NaN and isn't zero, then bitwise equality does hold (we take advantage of this in import to optimize min and max for example, when one input is a constant).
There was a problem hiding this comment.
Added a note to #93246 so we don't forget about this.
Float relop equality does not imply bitwise equality. So skip making local jtrue assertions about floating types.
Contributes to #93246.