[PATCH] D64275: [InstCombine] Generalize InstCombiner::foldAndOrOfICmpsOfAndWithPow2().

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 9 01:07:03 PDT 2019


lebedev.ri requested changes to this revision.
lebedev.ri added a comment.
This revision now requires changes to proceed.

Thanks for working on this!
This is for sure missing some one-use checks (i.e. increases instruction count).
Could you please add 5 copies of `@foo1_and_signbit_lshr_without_shifting_signbit`, each one with different instruction having extra use?
It is also a good idea to add a test where both sides of `or`/`and` are in this new form.



================
Comment at: llvm/test/Transforms/InstCombine/onehot_merge.ll:163-166
   %t1 = and i32 %t0, %k
   %t2 = icmp eq i32 %t1, 0
   %t3 = shl i32 %k, %c2
   %t4 = icmp sgt i32 %t3, -1
----------------
I'm guessing all these instructions must be one-use.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D64275





More information about the llvm-commits mailing list