[llvm] Fold patterns which uses <2N x iM> type for comparisons on <N x i2M> type (PR #184328)

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 10 04:53:43 PDT 2026


================
@@ -467,6 +484,10 @@ class LLVM_LIBRARY_VISIBILITY InstCombinerImpl final
     return Sel;
   }
 
+  Instruction *foldVni2mCmpEqUsingV2nim(Instruction &I);
+
+  Instruction *foldVni2mCmpGtUsingV2nim(Instruction &I);
----------------
RKSimon wrote:

just provide a single wrapper function (since most cases call both anyhow)? Put it with all the other visit/fold/canonicalize declarations earlier in the class.

a better (brief but descriptive) name would be nice as well

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


More information about the llvm-commits mailing list