[PATCH] D30477: [SCEV] Compute affine range in another way to avoid bitwidth extending.

Andrew Trick via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 28 17:02:11 PST 2017


atrick added a comment.

I haven't fully reviewed the code, but I'm really glad you were able to express the range without extending its width. Thanks for doing this.



================
Comment at: lib/Analysis/ScalarEvolution.cpp:4833
+  APInt StepSMax = StepSRange.getSignedMax();
+  bool CheckBackDirection = false;
+  bool CheckFwdDirection = false;
----------------
This is probably fine:

```
CheckBackDirection = StepSMin.isNegative();
```


https://reviews.llvm.org/D30477





More information about the llvm-commits mailing list