[llvm] [LV] Vectorize uncountable early exit store loops with combined conditions (PR #205109)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Sun Jul 19 13:34:12 PDT 2026
================
@@ -1783,10 +1804,16 @@ bool LoopVectorizationLegality::canUncountableExitConditionLoadBeMoved(
Instruction *L = nullptr;
Value *Ptr = nullptr;
Value *R = nullptr;
- // The exit-condition load can appear on either side of the icmp.
- if (!match(Br->getCondition(),
- m_OneUse(m_c_ICmp(m_OneUse(m_Instruction(L, m_Load(m_Value(Ptr)))),
- m_Value(R))))) {
+ if (!match(
+ Br->getCondition(),
----------------
fhahn wrote:
Here it a comment would be helpful to explain what we try to match here. it may also be good to pull out common parts like
```m_OneUse(m_c_ICmp(
m_OneUse(m_Instruction(L, m_Load(m_Value(Ptr)))),
m_Value(R))
```
into a sub-matcher variable
https://github.com/llvm/llvm-project/pull/205109
More information about the llvm-commits
mailing list