[PATCH] D59563: [ValueTracking] Compute range for abs without nsw

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 19 14:26:02 PDT 2019


lebedev.ri added inline comments.


================
Comment at: llvm/test/Transforms/InstSimplify/icmp-abs-nabs.ll:158
   %abs = select i1 %cmp, i32 %negx, i32 %x
   %r = icmp ult i32 %abs, 2147483649
   ret i1 %r
----------------
Hm, after thinking about it a bit more, i think the test coverage could be improved.
In reality, this test only shows that we end up folding this pattern to `true`.
But what are the thresholds for that opt to happen?
I.e. i think you'd want to add two more test cases here, with `2147483649+1` and `2147483649-1` constants.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D59563/new/

https://reviews.llvm.org/D59563





More information about the llvm-commits mailing list