[LLVMdev] 65bit integer math

Nick Lewycky nicholas at mxc.ca
Mon Oct 12 22:18:45 PDT 2009


I haven't looked at your attached .ll, but I have added code to the loop 
analyser to make it do this. Given the choice between not analysing loop 
evolutions and growing arithmetic by an extra bit, it will expand the 
arithmetic. It's in SCEV, which is used by pretty much every loop optimizer.

Nick

Villmow, Micah wrote:
> 
> 
> I have a test case(attached as fc_long.ll) that when run through the 
> optimizer produces 65bit integer math(fc_long-opt.ll).
> 
>  
> 
> Now I understand that llvm can have any length integer, but I consider 
> turning a 64bit mul into multiple 65 bit instructions to be a ‘bad’ 
> optimization. This eventually expands to a 128bit multiply 
> call(__multi3) which I have absolutely no interest in supporting. So I’m 
> wondering what optimization might be the culprit here so I can disable 
> it in this situation.
> 
>  
> 
> Micah
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev




More information about the llvm-dev mailing list