Skip to content

[WASM] Use rounding_mul_shift_right for q15mulr_sat_s pattern#7134

Merged
rootjalex merged 1 commit intomainfrom
rootjalex/wasm-q15mulr
Oct 29, 2022
Merged

[WASM] Use rounding_mul_shift_right for q15mulr_sat_s pattern#7134
rootjalex merged 1 commit intomainfrom
rootjalex/wasm-q15mulr

Conversation

@rootjalex
Copy link
Copy Markdown
Member

Noticed that the q15mulr_sat_s rule didn't use the corresponding intrinsic - meaning we'd lower rounding_mul_shift_right just to match the rule before.

@steven-johnson
Copy link
Copy Markdown
Contributor

Do we need an updated test in simd_op_check?

@rootjalex
Copy link
Copy Markdown
Member Author

rootjalex commented Oct 28, 2022

No, this change should have not introduce any code generation change - it just makes code generation (slightly) faster.

find_intrinsics will have already lifted the target pattern to a rounding_mul_shift_right. Before, when CodeGen_LLVM lowers that intrinsic (because CodeGen_WebAssembly doesn't pattern match it), the exact expected pattern is reproduced and then matched to the pattern that has the lowered form. Now we just side-step the lowering.

@rootjalex
Copy link
Copy Markdown
Member Author

Test failure appears unrelated

@rootjalex rootjalex merged commit bd15cee into main Oct 29, 2022
@rootjalex rootjalex deleted the rootjalex/wasm-q15mulr branch October 29, 2022 21:19
ardier pushed a commit to ardier/Halide-mutation that referenced this pull request Mar 3, 2024
…#7134)

Use rounding_mul_shift_right for WASM q15mulr_sat_s pattern
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants