[llvm] [VectorCombine] Scalarize extracts of ZExt if profitable. (PR #142976)

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 11 01:48:22 PDT 2025


================
@@ -1710,6 +1711,73 @@ bool VectorCombine::scalarizeLoadExtract(Instruction &I) {
   return true;
 }
 
+bool VectorCombine::scalarizeExtExtract(Instruction &I) {
+  if (!match(&I, m_ZExt(m_Value())))
+    return false;
+
+  // Try to convert a vector zext feeding only extracts to a set of scalar (Src
+  // << ExtIdx *Size) & (Size -1), if profitable.
----------------
RKSimon wrote:

make sure the pseudocode is on one line

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


More information about the llvm-commits mailing list