fitzgen opened Issue #1708:
Consider the following optimizations:
(=> (ishl $x $C) (ishl_imm $C $x)) (=> (when (imul $x $C) (is-power-of-two $C)) (ishl $x $(log2 $C)))
After applying the second optimization to some instruction sequence, then the first optimization can be applied to the result.
But it would be more efficient if we folded the second optimization into the first optimizations RHS:
(=> (when (imul $x $C) (is-power-of-two $C)) (ishl_imm $(log2 $C) $x))
We should make a pass in peepmatic to do this mechanically whenever possible.
fitzgen labeled Issue #1708:
Consider the following optimizations:
(=> (ishl $x $C) (ishl_imm $C $x)) (=> (when (imul $x $C) (is-power-of-two $C)) (ishl $x $(log2 $C)))
After applying the second optimization to some instruction sequence, then the first optimization can be applied to the result.
But it would be more efficient if we folded the second optimization into the first optimizations RHS:
(=> (when (imul $x $C) (is-power-of-two $C)) (ishl_imm $(log2 $C) $x))
We should make a pass in peepmatic to do this mechanically whenever possible.
github-actions[bot] commented on Issue #1708:
Subscribe to Label Action
cc @fitzgen
<details>
This issue or pull request has been labeled: "cranelift:area:peepmatic"Thus the following users have been cc'd because of the following labels:
- fitzgen: cranelift:area:peepmatic
To subscribe or unsubscribe from this label, edit the <code>.github/subscribe-to-label.json</code> configuration file.
Learn more.
</details>
Last updated: Dec 23 2024 at 12:05 UTC