[PATCH] D35347: [IRCE] Fix corner case with Start = INT_MAX

Anna Thomas via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 13 08:00:25 PDT 2017


anna accepted this revision.
anna added a comment.
This revision is now accepted and ready to land.

LGTM w/ comments inline.



================
Comment at: test/Transforms/IRCE/pre_post_loops.ll:19
+  %abc = icmp slt i32 %idx, %len
+  br i1 %abc, label %in.bounds, label %out.of.bounds, !prof !1
+
----------------
I don't think the branch weight really needed here? Pls remove if so.

Same for one below.


================
Comment at: test/Transforms/IRCE/pre_post_loops.ll:37
+; CHECK:      test_02
+; CHECK:      loop.preloop:
+
----------------
Could you pls add some statements here regarding what's the expected terminating condition of the preloop. Similar for the test above.


================
Comment at: test/Transforms/IRCE/pre_post_loops.ll:44
+loop:
+  %idx = phi i32 [ 2147483647, %entry ], [ %idx.next, %in.bounds ]
+  %idx.next = add i32 %idx, -1
----------------
Could you please state in the comment above the test that this tests the case where START = INT_MAX.


https://reviews.llvm.org/D35347





More information about the llvm-commits mailing list