I am looking to optimize a loop using loop unswitching and SIMD so that I can speedup execution time.
for (b_idx = 0; b_idx < e_idx; b_idx++) {
if (fxp < 0) {
fxp += LUT[b_idx];
x += ytmp;
y -= xtmp;
} else {
fxp -= LUT[b_idx];
x -= ytmp;
y += xtmp;
}
xtmp = x >> (b_idx + 1);
ytmp = y >> (b_idx + 1);
}