[llvm] [AArch64] Sink llvm.vscale.i32 into blocks for better isel (PR #93465)

Fangcao Wang via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 2 20:16:02 PDT 2024


LittleMeepo wrote:

> The patch looks reasonable but before accepting I would like to query why it's needed. I would expect functions to be decorated with a vscale_range attribute (clang adds `vscale_range(1,16)` when targeting SVE) which allows instcombine to remove the zero-extend and just emit a call to vscale.i64.

Sometimes the return value of llvm.vscale will have multiple users, and I'm not sure whether it's appropriate to implement it in instcombine. I found that when adding `-indvars-widen-indvars=false`, inc* was not generated,  so add a new pattern matching scene.

https://github.com/llvm/llvm-project/pull/93465


More information about the llvm-commits mailing list