[all-commits] [llvm/llvm-project] 74f983: [X86][SSE] combineSetCCMOVMSK - allow comparison w...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Tue Apr 13 09:37:51 PDT 2021


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

  Changed paths:
    M llvm/lib/Target/X86/X86ISelLowering.cpp
    M llvm/test/CodeGen/X86/vector-compare-all_of.ll
    M llvm/test/CodeGen/X86/vector-compare-any_of.ll

  Log Message:
  -----------
  [X86][SSE] combineSetCCMOVMSK - allow comparison with upper (known zero) bits in CMP(MOVMSK(PACKSS())) -> CMP(MOVMSK()) fold

We already allow the comparison of the upper bits of 'IsAllOf' (allbits) patterns, but we can safely compare the known zero bits for 'IsAnyOf' (zerobits) patterns as well.

This fixes an issues where we are comparing a type wide than the number of vector elements, which avoids a regression mentioned in rGbaadbe04bf75.




More information about the All-commits mailing list