[all-commits] [llvm/llvm-project] 5f84b6: [AArch64] Add MATCH loops to LoopIdiomVectorizePas...

Ricardo Jesus via All-commits all-commits at lists.llvm.org
Mon Feb 10 00:23:57 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5f84b6edd97153f1e5ec00ce110108ba8f6048bd
      https://github.com/llvm/llvm-project/commit/5f84b6edd97153f1e5ec00ce110108ba8f6048bd
  Author: Ricardo Jesus <rjj at nvidia.com>
  Date:   2025-02-10 (Mon, 10 Feb 2025)

  Changed paths:
    M llvm/lib/Transforms/Vectorize/LoopIdiomVectorize.cpp
    A llvm/test/Transforms/LoopIdiom/AArch64/find-first-byte.ll

  Log Message:
  -----------
  [AArch64] Add MATCH loops to LoopIdiomVectorizePass (#101976)

This patch adds a new loop to LoopIdiomVectorizePass, enabling it to
recognise and vectorise loops such as:
```cpp
template<class InputIt, class ForwardIt>
InputIt find_first_of(InputIt first, InputIt last,
                      ForwardIt s_first, ForwardIt s_last)
{
  for (; first != last; ++first)
    for (ForwardIt it = s_first; it != s_last; ++it)
      if (*first == *it)
        return first;
  return last;
}
```

These loops match the C++ standard library function `std::find_first_of`.



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