[LLVMdev] XOR Optimization
baldrick at free.fr
Tue Jul 26 12:50:39 PDT 2011
> Precisely. The code generated by unrolling can be folded into a single XOR and
> SHL. And even if it was not inside a loop, it can still be optimized. What I
> want to know is: is there any optimization supposed to optimize this code, but
> for some reason it thinks it is not possible, or there is no optimization for
> that situation at all?
it could be a phase ordering problem. If you run "opt -std-compile-opts" on the
unsatisfactory bitcode, does it clean up all the bit fiddling?
More information about the llvm-dev