[llvm] [InstCombine] Fix incorrect insert point when folding zext of deinterleave (PR #201977)

Min-Yih Hsu via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 6 11:41:12 PDT 2026


================
@@ -3332,11 +3332,12 @@ InstCombinerImpl::foldExtractionOfVectorDeinterleave(ZExtInst &RootZExt) {
   Value *DIV;
 
   using namespace PatternMatch;
-  Value *SVI = nullptr, *DI = nullptr;
+  Value *SV = nullptr, *DI = nullptr;
+  Instruction *SVI = nullptr;
   if (!match(&RootZExt,
              m_ZExt(m_CombineOr(
                  m_ExtractValue(m_Value(DI, m_Deinterleave2(m_Value(DIV)))),
-                 m_Value(SVI, m_Shuffle(m_Value(), m_Value()))))))
+                 m_Value(SV, m_Shuffle(m_Value(), m_Value()))))))
----------------
mshockwave wrote:

I didn't know `m_Instruction`, thanks! It should be fixed now.

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


More information about the llvm-commits mailing list