[LLVMdev] XOR optimization
Rafael Auler
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
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110726/1a5bd89c/attachment.html>
More information about the llvm-dev
mailing list