[PATCH] D85000: [ValueTracking] Improve llvm.abs handling in computeKnownBits.

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 31 09:02:50 PDT 2020


spatel added inline comments.


================
Comment at: llvm/test/Transforms/InstCombine/abs-intrinsic.ll:55
+
+; FIXME: We can just remove this abs all together.
+define i1 @abs_known_positive_input(i31 %x) {
----------------
This test folds, so FIXME here is confusing. Do we want a reduced test without the icmp?

```
define i32 @abs_of_zext(i31 %x) {
  %zext = zext i31 %x to i32
  %abs = call i32 @llvm.abs.i32(i32 %zext, i1 false)
  ret i32 %abs
}

```


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D85000



More information about the llvm-commits mailing list