[all-commits] [llvm/llvm-project] 05f699: [IR][NFC] Introduce Constant::containsMatchingVect...

Sean Clarke via All-commits all-commits at lists.llvm.org
Sat Jun 27 03:40:25 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 05f69942c5025295a4ddcab2b06d50774ac8f625
      https://github.com/llvm/llvm-project/commit/05f69942c5025295a4ddcab2b06d50774ac8f625
  Author: Sean Clarke <sclarke at tenstorrent.com>
  Date:   2026-06-27 (Sat, 27 Jun 2026)

  Changed paths:
    M llvm/include/llvm/IR/Constant.h
    M llvm/include/llvm/IR/PatternMatch.h
    M llvm/lib/Analysis/VectorUtils.cpp
    M llvm/lib/IR/Constants.cpp
    M llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
    M llvm/lib/Transforms/InstCombine/InstructionCombining.cpp

  Log Message:
  -----------
  [IR][NFC] Introduce Constant::containsMatchingVectorElement and corresponding matcher (#200502)

A common pattern when dealing with vectors is to iterate over each
element and check whether any element satisfies a condition. Introduce
`Constant::containsMatchingVectorElement` to generalize this behavior
along with a corresponding matcher `m_ContainsMatchingVectorElement`
which checks whether any elements match the given subpattern.

Remove function `llvm::maskContainsAllOneOrUndef` in favor of using this
generalization instead.

Co-authored-by: Ramkumar Ramachandra <r at artagnon.com>



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