This patch series is part of an ongoing effort to replace the SVE intrinsic svdiv by lower-strength instructions for division by constant. To that end, we implemented svdiv_impl::fold to perform the following transformation in gimple: - Division where all divisors are the same power of 2 --> svasrd - Division where all divisors are powers of 2 --> svasr We chose svdiv_impl::fold as location for the implementation to have the transform applied as early as possible, such that other (existing or future) gimple optimizations can be applied on the result. Currently, the transform to is only applied for signed integers, because there do not exist an unsigned svasrd and svasr. The transform has not (yet) been implemented for svdivr.
Please also comment/advise on the following: In a next patch, we would like to replace SVE division by constants (other than powers of 2) by multiply and shifts, similar as for scalar division. This is planned to be implemented in the gimple_folder as well. Thoughts? Signed-off-by: Jennifer Schmitz <jschm...@nvidia.com>
smime.p7s
Description: S/MIME cryptographic signature