llvm-project
4f09fa18 - [VPlan] Insert induction end values to the end of the preheader

Commit
5 hours ago
[VPlan] Insert induction end values to the end of the preheader After future #182595 `VPWidenInductionRecipe` might reference `VPValue`s defined in the preheader, so live-out value calculations must be inserted at the end of the preheader to avoid def-after-use errors. I believe modifying this transformation instead of adjusting #182595 is the right fix that avoids any unnecessary implicit dependencies between VPlan transformations. One possible fix in #182595 would be to emit something like ```llvm br i1 %stride.check, label %scalar, label %stride.expand.scevs stride.expand.scevs: %x = ... ... br label %vector.preheader vector.preheader: ; optimizeInductionLiveOutUsers emits %live.out = ... %x ... ... br label %vector.header ``` but that would mean that CFG simplification pass that could eliminate single-succ/single-pred edge/merge `stride.expand.scevs`/`vector.preheader` would be illegal which sounds like a very bad restriction to have.
Author
eas eas
Committer
eas eas
Parents
Loading