[all-commits] [llvm/llvm-project] e8f518: [VectorUtils] Replace maskIsAll{Zero, One}OrUndef w...
Sean Clarke via All-commits
all-commits at lists.llvm.org
Tue Jun 2 08:12:13 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: e8f518d6613b950958618db9466a5936d844ff26
https://github.com/llvm/llvm-project/commit/e8f518d6613b950958618db9466a5936d844ff26
Author: Sean Clarke <seanedwardsclarke at gmail.com>
Date: 2026-06-02 (Tue, 02 Jun 2026)
Changed paths:
M llvm/include/llvm/Analysis/VectorUtils.h
M llvm/include/llvm/IR/PatternMatch.h
M llvm/lib/Analysis/InstructionSimplify.cpp
M llvm/lib/Analysis/VectorUtils.cpp
M llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
M llvm/test/Transforms/InstCombine/masked_intrinsics-inseltpoison.ll
M llvm/test/Transforms/InstCombine/masked_intrinsics.ll
M llvm/test/Transforms/InstCombine/pr83947.ll
M llvm/test/Transforms/InstSimplify/call.ll
Log Message:
-----------
[VectorUtils] Replace maskIsAll{Zero,One}OrUndef with PatternMatch (#200040)
As part of the ongoing effort to deprecate UndefValue, and also to take
better advantage of pattern matching, eliminate the VectorUtils
functions `maskIsAllZeroOrUndef`/`maskIsAllOneOrUndef` and replace them
with new matchers `m_ZeroOrPoison` and `m_AllOnesOrPoison`.
The new matchers are simply `m_CombineOr` on `m_Zero`/`m_AllOnes` and
`m_Poison`. `m_Zero` and `m_AllOnes` already match vectors where some
(but not all) elements are poison, so these matchers were created to
also match the case where all elements are poison.
This affects InstCombine/InstSimplify with a mask containing `undef` for
the intrinsics `llvm.masked.load`, `llvm.masked.store`,
`llvm.masked.gather`, and `llvm.masked.scatter`.
Some relevant tests were altered to use poison instead of undef, and
test coverage for masked loads/stores with poison was increased.
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