[PATCH] D22377: [SCEV] trip count calculation for loops with unknown stride

Sanjoy Das via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 12 21:53:45 PDT 2016


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

lgtm with a minor nit


================
Comment at: llvm/lib/Analysis/ScalarEvolution.cpp:8804
@@ +8803,3 @@
+      !PositiveStride ? APInt(BitWidth, 1, IsSigned)
+                      : IsSigned ? getSignedRange(Stride).getSignedMin()
+                                 : getUnsignedRange(Stride).getUnsignedMin();
----------------
If it's all the same to you, I'd suggest avoiding a nested ternary and using an `if` instead.


https://reviews.llvm.org/D22377





More information about the llvm-commits mailing list