Open vfdff opened 1 month ago
Which pass is responsible for rewriting the loop exit condition from K != 1024
to &WORK[K] != &WORK[1024]
?
Loop strength reduction converts from idx != 1024
to offset != 16384
, which stays consistent throughout the entire rest of the code
void foo () { for (int K = 0; K < NUM; ++K) { res[K] = complex(WORK[K], WORK[K + NUM]);
}
}
.L2: ldr q30, [x0] add x0, x0, 16 ldr q31, [x0, 8176] st2 {v30.2d - v31.2d}, [x1], 32 cmp x2, x0 bne .L2
.LBB0_1: // =>This Inner Loop Header: Depth=1 ldr q0, [x9] add x11, x10, x8 add x8, x8, #32 ldr q1, [x9, #8192] cmp x8, #4, lsl #12 // =16384 add x9, x9, #16 st2 { v0.2d, v1.2d }, [x11] b.ne .LBB0_1