Stream: git-wasmtime

Topic: wasmtime / PR #4714 x64: Remove handling of `cmpps` and `...


view this post on Zulip Wasmtime GitHub notifications bot (Aug 15 2022 at 21:12):

elliottt opened PR #4714 from trevor/cmpps-produces-const to main:

On main, the cmpps and cmppd instructions will be treated as producing
constants if their arguments are the same and their immediate operand is 0,
which corresponds to ordered equality. The runtime behavior of this instruction
is not constant however, as it will output a lane of 0s if the corresponding
component is a NaN.

This PR removes the special handling of cmpps and cmppd from
produces_const, as it's not correctly identifying constants. An alternative
approach here would be to say that unordered equality will produce constants,
looking instead for the immediate value 8. We don't currently have any way of
emitting unordered equality for this instruction, so that would be an
optimization that would be worth making if we add that capability in the future.

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Aug 15 2022 at 21:19):

elliottt has marked PR #4714 as ready for review.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 15 2022 at 21:20):

elliottt edited PR #4714 from trevor/cmpps-produces-const to main:

On main, the cmpps and cmppd instructions will be treated as producing constants if their arguments are the same and their immediate operand is 0, which corresponds to ordered equality. The runtime behavior of this instruction is not constant however, as it will output a lane of 0s if either of the corresponding components are NaN.

This PR removes the special handling of cmpps and cmppd from produces_const, as it's not correctly identifying constants. An alternative approach here would be to say that unordered equality will produce constants, looking instead for the immediate value 8. We don't currently have any way of emitting unordered equality for this instruction, so that would be an optimization that would be worth making if we add that capability in the future.

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Aug 15 2022 at 21:58):

elliottt edited PR #4714 from trevor/cmpps-produces-const to main:

On main, the cmpps and cmppd instructions will be treated as producing constants if their arguments are the same and their immediate operand is 0, which corresponds to ordered equality. The runtime behavior of this instruction is not constant however, as it will output a lane of 0s if either of the corresponding components are NaN.

This PR removes the special handling of cmpps and cmppd from produces_const, as it's not correctly identifying constants. An alternative approach here would be to say that unordered equality will produce constants, looking instead for the immediate value 8. We don't currently have any way of emitting unordered equality tests, so that would be an optimization that would be worth making if we add that capability in the future.

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Aug 15 2022 at 22:43):

elliottt has enabled auto merge for PR #4714.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 15 2022 at 22:43):

elliottt requested cfallin for a review on PR #4714.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 15 2022 at 22:48):

cfallin submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 15 2022 at 22:48):

elliottt merged PR #4714.


Last updated: Dec 23 2024 at 12:05 UTC