In the transformation phase, at first LoopInterchange moves several instructions in the inner loop into the new latch block. The instructions used as incoming values to the induction variables from the latch block are the targets of this movement. Previously, this process could result in an infinite loop when a PHI node refers to another PHI node, as in the following example: ``` %i = phi i64 [ 0, %entry ], [ %i.inc, %latch ] %j = phi i64 [ 0, %entry ], [ %i, %latch ] ``` The root cause was that `%i` enqueued for processing because it is used by `%j`. This patch fixes the issue by preventing induction variables from being enqueued into the movement list. Fix #193733
93 KiB
93 KiB