[LLVMdev] XOR optimization
rafaelauler at gmail.com
Tue Jul 26 08:22:07 PDT 2011
I think he mean the intermediate steps:
%rem.1 = or i32 %rem, 1
%rem.2 = or i32 %rem, 2
%rem.3 = or i32 %rem, 3
When calculating bit_addr % 32. Inside the loop, %rem should be incremented
because of the loop unrolling, but instead, the optimizer thought it's
easier to OR it. This gives the same result, but it's weird.
2011/7/26 FlyLanguage <flylanguage at gmail.com>
> Den 26.07.2011 03:25, skrev Daniel Nicácio:
> > - Do you know why a OR instruction is used for increments? instead of
> > using a INC or ADD?
> You mean "bit_addr++;" ?
> It's add'ing (+4 due to loop unrolling i guess)
> %inc.3 = add i32 %0, 4
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev