[llvm-dev] Working on FP SCEV Analysis

via llvm-dev llvm-dev at lists.llvm.org
Mon May 16 17:12:43 PDT 2016


One thought I’ve had about this in the past —

SCEV is useful for proving two expressions are equivalent (in general, not just specifically for loop induction variables). This gets a little bit trickier with fast-math; for example, suppose two expressions are equivalent, but *only* with reassociativity allowed?

This would be useful to make N-ary reassociate or similar algorithms work with float, as it currently uses SCEV to prove equivalence, but fast-math makes it become much trickier (and without fast-math, there’s not much you can prove).

—escha

> On May 16, 2016, at 6:07 AM, Demikhovsky, Elena via llvm-dev <llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>> wrote:
> 
> Hi,
>  
> I’m working now on extending SCEV Analysis and adding FP support.
> At the beginning, I want to vectorize this loop:
>  
> float fp_inc;
>  
>   float x = init;
>   for (int i=0;i<N;i++){
>     A[i] = x;
>     x += fp_inc; // Loop invariant variable or constant
>   }
>  
> In this loop “x” is a FP induction variable. But it is not the “primary” induction and loop trip count is still depends on integer induction “i”.
>  
> In the future, I plan to work on “primary” FP inductions.
> Intel compiler vectorizes FP-induction loops, GCC does not.
>  
> I wanted to hear that community does not have any principal objections for this work.
> Thank you.
>  
> Elena
>  
>  
>  
> ---------------------------------------------------------------------
> Intel Israel (74) Limited
> 
> This e-mail and any attachments may contain confidential material for
> the sole use of the intended recipient(s). Any review or distribution
> by others is strictly prohibited. If you are not the intended
> recipient, please contact the sender and delete all copies.
> 
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev <http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160516/4ebd7516/attachment.html>


More information about the llvm-dev mailing list