[PATCH] D48853: [SCEV] Add zext(C + x + ...) -> D + zext(C-D + x + ...)<nuw> transform
Roman Tereshin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 9 23:42:39 PDT 2018
rtereshin added inline comments.
================
Comment at: test/Analysis/ScalarEvolution/no-wrap-add-exprs.ll:150
+; CHECK: %p1.zext = zext i8 %p1 to i16
+; CHECK-NEXT: --> (zext i8 (8 + (4 * %x)) to i16) U: [0,253) S: [0,256)
+
----------------
mkazantsev wrote:
> Its weird. Why signed and unsigned ranges are different?
That's a good question. One thing I know is that the issue is orthogonal to this patch and exists on trunk:
```
%p1.zext = zext i8 %p1 to i16
--> (zext i8 (8 + (4 * %x)) to i16) U: [0,253) S: [0,256)
```
(this is w/o this patch applied)
Perhaps unsigned range takes some knownbits-like information into account, while signed one doesn't.
Repository:
rL LLVM
https://reviews.llvm.org/D48853
More information about the llvm-commits
mailing list