Stream: git-wasmtime

Topic: wasmtime / PR #4728 x64: Refactor vector_all_ones, and re...


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

elliottt edited PR #4728 from trevor/sse-cmp-op-bug to main:

The rules for $F32X4 and $F64X2 overlap with the rules for (multi_lane 32 4) and (multi_lane 64 2) respectively. Additionally they would return SSE opcodes that must be used with xmm_rm_r_imm, but the result of sse_cmp_op is used directly with xmm_rm_r in the definition of vector_all_ones. If these cases were to suddenly become reachable through a heuristic change in ISLE, we would start seeing panics during code generation for lowerings that rely on vector_of_ones.

<!--

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 17 2022 at 20:59):

elliottt edited PR #4728 from trevor/sse-cmp-op-bug to main:

The sse_cmp_op rule had cases that would produce SseOperand values that aren't legal to use with MInst.XmmRmR, and was only used in vector_all_ones when constructing an XmmRmR value. Additionally, vector_all_ones always called sse_cmp_op with the same type, so the other cases were redundant.

The solution in this PR is to remove sse_cmp_op entirely and inline a call to x64_pcmpeqd directly in vector_all_ones, and remove the unused argument from vector_all_ones.

<!--

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 17 2022 at 20:59):

jameysharp submitted PR review.

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

elliottt has enabled auto merge for PR #4728.

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

elliottt merged PR #4728.


Last updated: Dec 23 2024 at 12:05 UTC