[llvm] [VPlan] Handle exit phis with multiple operands in addUsersInExitBlocks. (PR #120260)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 17 08:36:27 PST 2024


fhahn wrote:

yes this fixes an existing bug, i.e. cases where we incorrectly would try to vectorize an early exit loop with non-live-in exit values. The particular case we missed is a single exit phi with a live-in incoming value from the loop latch and a non-live-in from the early exit;

Previously we only checked the first operand of the VPIRInstruction wrapping the exit phi and would only check the live-in.

Now as a side effect this particular case we can now handle the inverse case (live-in from the early exit and IV from the latch) unless I am missing anything, as we should be able to compute the exit value from the latch as previously and pass through the live-in.

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


More information about the llvm-commits mailing list