[llvm] [AArch64] Use INDEX for constant Neon step vectors (PR #113424)

Ricardo Jesus via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 23 04:29:45 PDT 2024


rj-jesus wrote:

> Please add a more specific/dedicated test because the existing active_lane_mask tests should all ideally result in `while` instructions when SVE is available, so we'll be missing test coverage when that happens.

Thanks, done.

A couple of questions:
1. Should we limit this to cases where the start and step of the sequence are in [-16, 15] so that we can use INDEX (immediates)? Or should we allow the general case (e.g. test case `v4i32_out_range_start_step`), where we might need to use INDEX (scalars) or INDEX (scalar, immediate)? What do you think?

2. For the sequence:
```
define <4 x i32> @v4i32_non_zero_non_one() {
  ret <4 x i32> <i32 1, i32 3, i32 5, i32 7>
}
```
We generate:
```
v4i32_non_zero_non_one:
  index z0.s, #0, #2
  orr z0.s, z0.s, #0x1
  ret
```
This doesn't seem specific to this patch so I think we can address it separately.

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


More information about the llvm-commits mailing list