[PATCH] D17201: [SCEV] Introduce a guarded backedge taken count and use it in LAA and LV

silviu.baranga@arm.com via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 10 02:39:38 PST 2016


sbaranga added a comment.

Hi Sanjoy,

I've added the test/Analysis/ScalarEvolution/predicated-trip-count.ll test which goes through some use cases of this feature for whitebox testing.
Was this what you had in mind, or do you think we should also be doing something else?

Thanks,
Silviu


================
Comment at: test/Transforms/LoopVectorize/X86/vectorization-remarks-missed.ll:54
@@ -53,3 +53,3 @@
 for.body:                                         ; preds = %entry, %for.body
   %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ]
   %arrayidx = getelementptr inbounds i32, i32* %A, i64 %indvars.iv, !dbg !16
----------------
I had to change this test because it started to figure out what the backedge taken count was.

This was testing the vectorization remark when we cannot find the backedge taken count. changed the test so that it will continue not be able to get the backedge taken count.

What is interesting about this is the way we've managed to get the (exact) backedge taken count. The initial analysis was only able to get the maximum backedge taken count but not the exact one. However, we can use this to get a better SCEV for cmp3.

On a following invocation of computeBackedgeTakenCount this information is used to get an exact backedge taken count.


http://reviews.llvm.org/D17201





More information about the llvm-commits mailing list