[all-commits] [llvm/llvm-project] 2cdbac: [X86] Attempt to fold MOVMSK(CMPEQ(AND(X, C1), 0)) -...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Sun Jan 30 07:55:31 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2cdbaca3943a4d6259119f185656328bd3805b68
      https://github.com/llvm/llvm-project/commit/2cdbaca3943a4d6259119f185656328bd3805b68
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2022-01-30 (Sun, 30 Jan 2022)

  Changed paths:
    M llvm/lib/Target/X86/X86ISelLowering.cpp
    M llvm/test/CodeGen/X86/combine-movmsk.ll
    M llvm/test/CodeGen/X86/vector-reduce-or-cmp.ll

  Log Message:
  -----------
  [X86] Attempt to fold MOVMSK(CMPEQ(AND(X,C1),0)) -> MOVMSK(NOT(SHL(X,C2)))

Allows pow2 mask tests to avoid an unnecessary constant load.

Noticed while investigating how to extend MatchVectorAllZeroTest to support more allof/anyof patterns.




More information about the All-commits mailing list