llvm-project
177f616d - [VPlan] Expand AddRecs in VPlan, only canonical ARs in IR. (#230858)

Commit
19 days ago
[VPlan] Expand AddRecs in VPlan, only canonical ARs in IR. (#230858) Expand AddRecs of loops outside VPlan's scope in VPSCEVExpander mirroring SCEVExpander::visitAddRecExpr: * {X,+,F} is expanded as X + {0,+,F} (using ptradd for pointers) * {0,+,F} as {0,+,1} * F. * narrow canonical are expanded by truncating a wide canonical IV, if one exits. Only canonical IVs (and non-affine AddRecs) are expanded by IR SCEVExpander (as VPExpandSCEVRecipe), which re-uses or creates new instructions outside VPlan's scope (in the loop that contains the AddRec). PR: https://github.com/llvm/llvm-project/pull/230858
Author
Parents
Loading