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

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 31 14:37:19 PDT 2020


craig.topper 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) {
----------------
spatel wrote:
> 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
> }
> 
> ```
I assume this will be covered by your InstSimplify change?


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

https://reviews.llvm.org/D85000



More information about the llvm-commits mailing list