[all-commits] [llvm/llvm-project] 82de01: [X86][SSE] LowerVectorAllZero - add support for ma...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Tue Jun 30 06:40:33 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 82de01895455c2ac0f2aa7397414ca96757bea06
      https://github.com/llvm/llvm-project/commit/82de01895455c2ac0f2aa7397414ca96757bea06
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2020-06-30 (Tue, 30 Jun 2020)

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

  Log Message:
  -----------
  [X86][SSE] LowerVectorAllZero - add support for masked OR-reductions

If we're masking the result of an OR-reduction before comparing against zero, we can fold this into the PTEST() / MOVMSK(CMPEQ()) codegen by pre-masking the source value.

This works particularly well on PTEST which performs the AND as part of its operation, but the MOVMSK variant also benefits for non-V2I64 cases.

Fixes PR44781




More information about the All-commits mailing list