[llvm] [SimplifyCFG] handle monotonic wrapped case for D150943 (PR #65882)

Kohei Asano via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 11 23:30:52 PDT 2023


khei4 wrote:

Thank you for the review!

> Can you please update the PR description with more details about what the problematic case is an how this fixes it?
Sure! 


> My understanding is that in this case we are mapping (after index adjustment) the indices (0, 1, 2, 3) to (-4, -2, 0, 2) so we have a monotonic sequence, but this is done by doing a multiply first, so we go through (0, 2, -4, -2) first, which wraps.

I think you are right.

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


More information about the llvm-commits mailing list