Stream: git-wasmtime

Topic: wasmtime / PR #8869 cranelift/aarch64: Support fmsub


view this post on Zulip Wasmtime GitHub notifications bot (Jun 24 2024 at 23:25):

HerrCai0907 opened PR #8869 from HerrCai0907:support-fmsub to bytecodealliance:main:

<!--
Please make sure you include the following information:

Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.html

Please ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->

view this post on Zulip Wasmtime GitHub notifications bot (Jun 24 2024 at 23:25):

HerrCai0907 requested elliottt for a review on PR #8869.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 24 2024 at 23:25):

HerrCai0907 requested wasmtime-compiler-reviewers for a review on PR #8869.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 24 2024 at 23:27):

HerrCai0907 updated PR #8869.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 24 2024 at 23:29):

HerrCai0907 updated PR #8869.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 24 2024 at 23:30):

HerrCai0907 edited PR #8869:

<!--
Please make sure you include the following information:

Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.html

Please ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->

This PR wants to add the fmsub instruction lowering supporting for aarch64.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 24 2024 at 23:31):

HerrCai0907 edited PR #8869:

<!--
Please make sure you include the following information:

Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.html

Please ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->

This PR wants to add the fmsub instruction lowering supporting for aarch64.
Part of #8603.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 25 2024 at 00:00):

elliottt submitted PR review:

This seems reasonable, but could you add a test case in cranelift/filetests/filetests/isa/aarch64 that shows what the disassembly for some simple clif programs will look like?

view this post on Zulip Wasmtime GitHub notifications bot (Jun 25 2024 at 00:00):

elliottt submitted PR review:

This seems reasonable, but could you add a test case in cranelift/filetests/filetests/isa/aarch64 that shows what the disassembly for some simple clif programs will look like?

view this post on Zulip Wasmtime GitHub notifications bot (Jun 25 2024 at 00:00):

elliottt created PR review comment:

I think that this can be a regular let, as fneg will never fail, right?

view this post on Zulip Wasmtime GitHub notifications bot (Jun 25 2024 at 01:41):

HerrCai0907 closed without merge PR #8869.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 25 2024 at 01:42):

HerrCai0907 reopened PR #8869.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 25 2024 at 01:51):

HerrCai0907 created PR review comment:

I follow the riscv lower rules.
https://github.com/bytecodealliance/wasmtime/blob/f4b49b8c8942523b5bc44d09aa455fadaf848e41/cranelift/codegen/src/isa/riscv64/lower.isle#L1557-L1561

view this post on Zulip Wasmtime GitHub notifications bot (Jun 25 2024 at 01:51):

HerrCai0907 submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 25 2024 at 01:55):

HerrCai0907 edited PR review comment.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 25 2024 at 03:22):

HerrCai0907 updated PR #8869.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 25 2024 at 09:29):

HerrCai0907 requested elliottt for a review on PR #8869.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 26 2024 at 14:27):

HerrCai0907 submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 26 2024 at 14:27):

HerrCai0907 created PR review comment:

I don't find a way to convert this if-let to let. Could you give me some suggestion? @elliottt

view this post on Zulip Wasmtime GitHub notifications bot (Jun 28 2024 at 13:39):

HerrCai0907 updated PR #8869.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 28 2024 at 15:31):

elliottt submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 28 2024 at 15:31):

elliottt created PR review comment:

It's a little more verbose, but:

(decl is_fneg_neg (IsFneg) u64)
(rule (is_fneg_neg (IsFneg.Result n _)) n)

(decl is_fneg_value (IsFneg) Value)
(rule (is_fneg_value (IsFneg.Result _ v)) v)

(decl pure is_fneg (Value) IsFneg)
(rule 1 (is_fneg (fneg x)) (IsFneg.Result 1 x))
(rule 0 (is_fneg x) (IsFneg.Result 0 x))

(rule (lower (has_type ty (fma x_src y_src z_src)))
  (let
    ((x_res IsFneg (is_fneg x_src))
     (y_res IsFneg (is_fneg y_src))
     (z_res IsFneg (is_fneg z_src))
     (neg_xy u64 (u64_xor (is_fneg_neg x_res) (is_fneg_neg y_res)))
     (x Value (is_fneg_value x_res))
     (y Value (is_fneg_value y_res))
     (z Value (is_fneg_value z_res)))
    (rv_fma ty neg_xy (is_fneg_neg z_res) x y z)))

view this post on Zulip Wasmtime GitHub notifications bot (Jun 28 2024 at 15:31):

elliottt edited PR review comment.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 29 2024 at 00:18):

HerrCai0907 updated PR #8869.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 02 2024 at 16:58):

elliottt submitted PR review:

Thank you!

view this post on Zulip Wasmtime GitHub notifications bot (Jul 02 2024 at 17:13):

elliottt merged PR #8869.


Last updated: Dec 23 2024 at 12:05 UTC