[llvm] [PatternMatch] Allow `m_ConstantInt` to match integer splats (PR #153692)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 15 02:18:22 PDT 2025
nikic wrote:
> `m_ConstantInt` is intended to match a scalar. We may need a separate matcher to handle constant splats.
>From a cursory review, m_ConstantInt is mostly used in cases where it's known that the value is scalar (extractelement index, SCEV, branch condition), so those would be unaffected if it started accepting splats as well.
I don't think there is a lot of value in having a matcher that specifically forbids vectors... if that is a constraint of the transform, it would be better to make that explicit.
https://github.com/llvm/llvm-project/pull/153692
More information about the llvm-commits
mailing list