[PATCH] D63534: [InstCombine] cttz(-x) -> cttz(x)

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 20 06:10:42 PDT 2019


spatel accepted this revision.
spatel added a comment.
This revision is now accepted and ready to land.

LGTM



================
Comment at: test/Transforms/InstCombine/cttz-negative.ll:19-20
 ;
-  %a = sub nsw i64 0, %x
+  %a = sub i64 0, %x
   %b = tail call i64 @llvm.cttz.i64(i64 %a, i1 true)
   ret i64 %b
----------------
It would be better if at least 1 of these tests showed an extra use of the negated value. That would verify that we still do the transform independently of uses of that value.


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

https://reviews.llvm.org/D63534





More information about the llvm-commits mailing list