[PATCH] D156778: [SelectionDAG] Improve `isKnownToBeAPowerOfTwo`

Noah Goldstein via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 3 10:20:01 PDT 2023


goldstein.w.n added inline comments.


================
Comment at: llvm/test/CodeGen/X86/known-pow2.ll:625
 ; CHECK-NEXT:    pcmpeqd %xmm1, %xmm0
+; CHECK-NEXT:    pxor %xmm2, %xmm0
 ; CHECK-NEXT:    retq
----------------
RKSimon wrote:
> Any luck in triaging this?
I think for vecs (on X86) doing `X & Y != 0` is just not preferable to `X & Y == Y`.
I fixed this up in D157014 and changed the rest of the `vselect` tests to use `ne` so we can properly see the change.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D156778



More information about the llvm-commits mailing list