[PATCH] D50075: [UnJ] Improve explicit loop count checks

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 11 00:36:45 PDT 2018


dmgreen added a comment.

Thanks



================
Comment at: test/Transforms/LoopUnrollAndJam/pragma-explicit.ll:9
+; CHECK: %indvars.iv.3 = phi i64 [ 0, %for.cond1.preheader.us ], [ %indvars.iv.next.3, %for.body4.us ]
+; CHECK-NOT: %indvars.iv.4 = phi i64 [ 0, %for.cond1.preheader.us ], [ %indvars.iv.next.4, %for.body4.us ]
+define void @function(i8* noalias nocapture %dst, i32 %dst_stride, i8* noalias nocapture readonly %src, i32 %src_stride, i32 %A, i32 %B, i32 %C, i32 %D, i32 %width, i32 %height) {
----------------
Meinersbur wrote:
> `-NOT` tests are quite fragile. To check that there is no 4th unroll, did you consider checking e.g. the `; preds = ` of the BB that follows the last unroll copy?
The unrolled BB's get merged, usually leaving just the first block, so unfortunately I don't think the preds will show much. I've changed things to check the outer phi nodes, where it can check that the return phi comes from %.pre60.3, in this case.


https://reviews.llvm.org/D50075





More information about the llvm-commits mailing list