[llvm-dev] LoopVectorizer with ifconversion

Hal Finkel via llvm-dev llvm-dev at lists.llvm.org
Fri Mar 17 09:34:48 PDT 2017


On 03/17/2017 11:11 AM, Jonas Paulsson via llvm-dev wrote:
>
> Hi,
>
> it seems to be generally a bad idea to enable vectorization of 
> conditional stores on SystemZ, because it will cost extra instructions 
> both to 1. extract compare result element 2. Do a test-under-mask 
> instruction on that element 3. conditional branch past the store block.

In general, this is true everywhere. In a large vectorized loop, this 
cost may well be worthwhile. The idea is that the cost model should 
account for all of these costs. If it doesn't properly, we should fix that.

  -Hal

>
> Ideally, I would like to adjust the cost for the vector compare. I am 
> not sure if this is feasable since I would need to know that the 
> compare is becoming a vector compare for a block that will not go away 
> after vectorization (which is the case if there is a store in it).
>
> The LoopVectorizer seems to have this information available. Is it 
> possible to easily use it in this case somehow?
>
> Or is it more convenient to add a tti hook to complement the 
> EnableCondStoresVectorization option, perhaps?
>
> /Jonas
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev

-- 
Hal Finkel
Lead, Compiler Technology and Programming Languages
Leadership Computing Facility
Argonne National Laboratory



More information about the llvm-dev mailing list