[PATCH] D19694: [LV] Allow interleaved accesses in loops with predicated blocks
Matthew Simpson via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 8 11:00:39 PDT 2016
mssimpso added a comment.
Wow, thanks for the quick response! Some comments inline.
================
Comment at: lib/Transforms/Vectorize/LoopVectorize.cpp:5438
@@ +5437,3 @@
+ auto *BlockB = B->getParent();
+ if (BlockA != BlockB && (isPredicated(BlockA) || isPredicated(BlockB)))
+ continue;
----------------
sbaranga wrote:
> Could we also have a test where all the accesses in a group are predicated and in the same block? In this case would all the predicated accesses be scalarized as well? (there might be some issues with out of bounds accesses from the wide load/store and the scalar epilogue if that's not the case)
>
Yes, I wanted a test case like that, but I haven't been able to produce one that the vectorizer likes. It complains about being unable to if-convert the block I believe. I can look into this further, but currently I think we are limited to one store per predicated block. In which case, yes, we would always scalarize.
================
Comment at: test/Transforms/LoopVectorize/interleaved-accesses-pred-stores.ll:36
@@ +35,3 @@
+ %i = phi i64 [ %i.next, %if.merge ], [ 0, %entry ]
+ %p.0 = getelementptr inbounds %pair, %pair* %p, i64 %i, i32 0
+ %p.1 = getelementptr inbounds %pair, %pair* %p, i64 %i, i32 1
----------------
anemet wrote:
> Is %p.0 unused here?
Yes, thanks for noticing! I'll remove it.
http://reviews.llvm.org/D19694
More information about the llvm-commits
mailing list