[all-commits] [llvm/llvm-project] 38c799: [X86] Fold cmpeq/ne(and(X, Y), Y) --> cmpeq/ne(and(~...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Sun Apr 11 10:51:49 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 38c799bce8016f7487067a031b62cf98069aaa4d
      https://github.com/llvm/llvm-project/commit/38c799bce8016f7487067a031b62cf98069aaa4d
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2021-04-11 (Sun, 11 Apr 2021)

  Changed paths:
    M llvm/lib/Target/X86/X86ISelLowering.cpp
    M llvm/test/CodeGen/X86/bmi.ll
    M llvm/test/CodeGen/X86/movmsk-cmp.ll
    M llvm/test/CodeGen/X86/pr27202.ll
    M llvm/test/CodeGen/X86/vector-reduce-and-bool.ll

  Log Message:
  -----------
  [X86] Fold cmpeq/ne(and(X,Y),Y) --> cmpeq/ne(and(~X,Y),0)

Followup to D100177, handle an similar (demorgan inverse style) case from PR47797 as well

The AVX512 test cases could be further improved if we folded not(iX bitcast(vXi1)) -> (iX bitcast(not(vXi1)))

Alive2: https://alive2.llvm.org/ce/z/AnA_-W




More information about the All-commits mailing list