[llvm] [LV] Add vplan folds for urem(X, PowerOf2) -> and(X, PowerOf2 - 1) (PR #212198)

David Sherwood via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 4 02:40:57 PDT 2026


================
@@ -1366,6 +1366,15 @@ static void simplifyRecipe(VPSingleDefRecipe *Def) {
   }
 
   const APInt *APC;
+  // TODO: Enable optimizations in the vector preheader in a follow-up PR.
+  // This check currently means we only simplify before region dissolution.
+  VPBasicBlock *Preheader = Plan->getVectorPreheader();
----------------
david-arm wrote:

We need to fix `getVectorPreheader` I think.

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


More information about the llvm-commits mailing list