[llvm] [VPlan] Sink vector loop region recipes in licm (PR #172343)
Mel Chen via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 16 00:15:06 PST 2025
Mel-Chen wrote:
> > Looks like this is similar to @Mel-Chen 's #168031
>
> Oh I didn't see that PR before, looks like we're doing the same thing!
>
> Just briefly checking that PR it looks like this one is a bit more general since it can sink down to the NCD block not just the regions successor. I think this PR also avoids the need for a worklist by doing a post order traversal.
I also used post order traversal too. I recall using a worklist because I saw a nested loop in a lit test case (I hope I remember correctly). Therefore, the worklist ensures that inner loops are sunk first, followed by the outer loops.
> I'm not sure why this PR doesn't seem to need the VPlanUnroll.cpp changes either
https://github.com/llvm/llvm-project/pull/168031/commits/da2407e72663c6520eedb6a1576eae525a179788
The ICE was caused because the replicate recipes were sunk. However, this case involves llvm.assume; @fhahn later pointed out that llvm.assume shouldn’t be sunk, but I haven’t updated this yet.
https://github.com/llvm/llvm-project/pull/172343
More information about the llvm-commits
mailing list