[PATCH] D144284: [X86] Add transform for `(and/or (icmp eq/ne A,-1),(icmp eq/ne A,-1+C))`->`(and/or (icmp eq/ne (and ~A,-1+C),0))`

Noah Goldstein via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 17 10:34:38 PST 2023


goldstein.w.n added inline comments.


================
Comment at: llvm/test/CodeGen/X86/icmp-pow2-dif.ll:218
+; AVX2-NEXT:    vpandn {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0, %xmm0
+; AVX2-NEXT:    vpxor %xmm2, %xmm2, %xmm2
 ; AVX2-NEXT:    vpcmpeqw %xmm2, %xmm0, %xmm0
----------------
NB: This is the least useful case, but we still get `vpcmpeq` -> `vpxor` the latter of which is zero-idiom doesn't take any execution unit.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D144284



More information about the llvm-commits mailing list