Skip to content

[AArch64] Missed optimization converting vector fmul(sitofp(x), 0.5) -> scvtf(x, 2) #94909

@efriedma-quic

Description

@efriedma-quic

In #91924, we removed the existing combine for vector fdiv(sitofp(x), 2) -> scvtf(x, 2) etc. because it would almost never trigger: instcombine converts all fdiv operations by powers of two to fmul. However, the idea behind the optimization is still useful: for the given conversion operations, we can eliminate the multiply. We should try to restore this optimization so it works on vector inputs. (This optimization is already implemented for scalar inputs.)
https://godbolt.org/z/c8qx7v4b4

Marking this good-first-issue because the code that was removed can be used as a starting point for this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions