I\'m trying to find a way to perform an indirect shift-left/right operation without actually using the variable shift op or any branches.
The particular PowerPC pro
Here's something that is trivially unrollable:
int result= value; int shift_accumulator= value; for (int i= 0; i<5; ++i) { result += shift_accumulator & (-(k & 1)); // replace with isel if appropriate shift_accumulator += shift_accumulator; k >>= 1; }