[llvm] [VectorCombine] Scalarize bin ops and cmps with two splatted operands (PR #137786)

Min-Yih Hsu via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 29 12:38:16 PDT 2025


mshockwave wrote:

> In fact, I'm confused why the block which starts with "If one argument is a shuffle within one vector and the other is a constant" doesn't transform this case.

I think It's relatively subtle: because that rule currently matches the constant with `m_ImmConstant` which does _not_ seem to recognize ConstantExpr. And when a constant splat has scalable vector type, LLVM actually uses ConstantExpr under the hood

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


More information about the llvm-commits mailing list