afonso360 requested cfallin for a review on PR #8546.
afonso360 requested wasmtime-compiler-reviewers for a review on PR #8546.
afonso360 opened PR #8546 from afonso360:riscv-isle-round
to bytecodealliance:main
:
:wave: Hey,
This PR is a small cleanup to our lowerings for rounding instructions (
ceil
/floor
/trunc
/nearest
). It moves the generated code from a single pseudo-instruction into an ISLE lowering.The rounding lowering remains mostly the same, except it removes an extraneous
fadd
that we ended up not really needing. It also improves the constant codegen since we have a more advanced algorithm in ISLE that does better pattern matching.This PR also moves the ISA tests to separate files, but that is done on the first commit, so looking at the second commit individually gives the actual changes to the assembly output.
afonso360 edited PR #8546:
:wave: Hey,
This PR is a small cleanup to our lowerings for rounding instructions (
ceil
/floor
/trunc
/nearest
). It moves the generated code from a single pseudo-instruction into an ISLE lowering.The rounding lowering remains mostly the same, except it removes an extraneous
fadd
that we ended up not really needing. It also improves the constant codegen since we have a more advanced algorithm in ISLE that does better pattern matching.This PR also moves the ISA tests to separate files, but that is done on the first commit, so looking at the second commit individually gives the actual changes to the assembly output.
Also, FloatRound was the only instruction in the
riscv64_worst_case_instruction_size
but theworst_case_size
was way larger than what was actually needed for that instruction. I suspect there is some other instruction that may need that much size. I added a few cases, but none ended up at the 124 bytes that it is currently set to. Something to track down later...
afonso360 edited PR #8546:
:wave: Hey,
This PR is a small cleanup to our lowerings for rounding instructions (
ceil
/floor
/trunc
/nearest
). It moves the generated code from a single pseudo-instruction into an ISLE lowering.The rounding lowering remains mostly the same, except it removes an extraneous
fadd
that we ended up not really needing. It also improves the constant codegen since we have a more advanced algorithm in ISLE that does better pattern matching.This PR also moves the ISA tests to separate files, but that is done on the first commit, so looking at the second commit individually gives the actual changes to the assembly output.
Also, FloatRound was the only instruction in the
riscv64_worst_case_instruction_size
test but theworst_case_size
was way larger than what was actually needed for that instruction. I suspect there is some other instruction that may need that much size. I added a few cases, but none ended up at the 124 bytes that it is currently set to. Something to track down later...
alexcrichton submitted PR review:
Very nice refactoring :+1:
afonso360 updated PR #8546.
afonso360 updated PR #8546.
afonso360 merged PR #8546.
Last updated: Dec 23 2024 at 13:07 UTC