[llvm] [AArch64] - Improve costing for Identity shuffles for SVE targets. (PR #165375)

David Green via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 5 10:14:46 PST 2025


https://github.com/davemgreen commented:

What are you trying to move? Does it help to just move this bit of code
```
  // Check for identity masks, which we can treat as free.
  if (!Mask.empty() && LT.second.isFixedLengthVector() &&
      (Kind == TTI::SK_PermuteTwoSrc || Kind == TTI::SK_PermuteSingleSrc) &&
      all_of(enumerate(Mask), [](const auto &M) {
        return M.value() < 0 || M.value() == (int)M.index();
      }))
    return 0;
```

Above this line
```
// Segmented shuffle matching.
```

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


More information about the llvm-commits mailing list