[llvm] [VPlan] Simplify pow-of-2 (mul|udiv) -> (shl|lshr) (PR #172477)
Luke Lau via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 5 22:46:37 PST 2026
================
@@ -291,7 +291,8 @@ struct Recipe_match {
return false;
if (R->getNumOperands() != std::tuple_size<Ops_t>::value) {
- assert(Opcode == Instruction::PHI &&
+ auto *RepR = dyn_cast<VPReplicateRecipe>(R);
+ assert((Opcode == Instruction::PHI || RepR && RepR->isPredicated()) &&
----------------
lukel97 wrote:
How come we need this bit? Does the udiv simplification match on a predicated VPReplicateRecipe or something?
https://github.com/llvm/llvm-project/pull/172477
More information about the llvm-commits
mailing list