[LLVMdev] Failure to optimize vector select

Matt Arsenault arsenm2 at gmail.com
Tue Aug 20 15:29:34 PDT 2013


On Aug 20, 2013, at 14:49 , Nadav Rotem <nrotem at apple.com> wrote:

> Hi Matt, 
> 
> This code maintains a vector of float4 and it inserts and extracts values from this vector. The ’select’ operations are already vectorized. Maybe a sequence of inst-combines (or DAG-combines) can help. If you re-write this code using scalars then the slp-vectorizer, with some tweaks, will be able to catch it. 
> 

I've tried manually scalarizing the arguments so the other select arguments are scalars, but the vectorizer still doesn't change it. Here is the scalarized IR.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: manual_scalarize.ll
Type: application/octet-stream
Size: 1739 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130820/1b1f33b4/attachment.obj>
-------------- next part --------------



More information about the llvm-dev mailing list