[all-commits] [llvm/llvm-project] 8a9921: [AArch64] Use INDEX for constant Neon step vectors...

Ricardo Jesus via All-commits all-commits at lists.llvm.org
Wed Oct 23 07:20:56 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8a9921f5692ab33451d11454b40a023ca0965a69
      https://github.com/llvm/llvm-project/commit/8a9921f5692ab33451d11454b40a023ca0965a69
  Author: Ricardo Jesus <rjj at nvidia.com>
  Date:   2024-10-23 (Wed, 23 Oct 2024)

  Changed paths:
    M llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
    M llvm/test/CodeGen/AArch64/active_lane_mask.ll
    A llvm/test/CodeGen/AArch64/sve-index-const-step-vector.ll

  Log Message:
  -----------
  [AArch64] Use INDEX for constant Neon step vectors (#113424)

When compiling for an SVE target we can use INDEX to generate constant
fixed-length step vectors, e.g.:
```
uint32x4_t foo() {
  return (uint32x4_t){0, 1, 2, 3};
}
```
Currently:
```
foo():
        adrp    x8, .LCPI1_0
        ldr     q0, [x8, :lo12:.LCPI1_0]
        ret
```
With INDEX:
```
foo():
        index   z0.s, #0, #1
        ret
```

The logic for this was already in `LowerBUILD_VECTOR`, though it was
hidden under a check for `!Subtarget->isNeonAvailable()`. This patch
refactors this to enable the corresponding code path unconditionally for
constant step vectors (as long as we can use SVE for them).



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list