[LLVMdev] [RFC][Float2Int] Converting (fcmp Pred, x * F, y) to (ICmp ...)

Matt Arsenault arsenm2 at gmail.com
Wed Apr 29 11:33:55 PDT 2015


> On Apr 29, 2015, at 10:06 AM, Silviu Baranga <Silviu.Baranga at arm.com> wrote:
> 
> Note that dividing by an integer constant should be a cheap operation
> compared to FP multiplication and comparison as this would get lowered to a
> multiply+subtract+shift sequence (and should certainly be true on cores with no
> FP unit)
>  

This is not true on the targets I care about. The integer division (which, even with the division by constant expansion to multiplies with magic constants) would be significantly more expensive.

-Matt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150429/b474877f/attachment.html>


More information about the llvm-dev mailing list