[llvm] [InstCombine] Pull extract through broadcast (PR #143380)
    via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Mon Jun  9 07:11:36 PDT 2025
    
    
  
================
@@ -542,6 +542,12 @@ Instruction *InstCombinerImpl::visitExtractElementInst(ExtractElementInst &EI) {
         }
       }
     } else if (auto *SVI = dyn_cast<ShuffleVectorInst>(I)) {
+      // extractelt (shufflevector %v1, %v2, zeroinitializer) ->
+      // extractelt %v1, 0
+      if (isa<FixedVectorType>(SVI->getType()))
----------------
agorenstein-nvidia wrote:
Thanks for taking such a quick look. To disambiguate, you're requesting I relax this constraint to include scalable vectors too? I'd be happy to do so and add the appropriate test.
https://github.com/llvm/llvm-project/pull/143380
    
    
More information about the llvm-commits
mailing list