[all-commits] [llvm/llvm-project] d194ff: [X86][SSE] Simplify MOVMSK patterns based on compa...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Fri Jun 5 08:56:36 PDT 2020


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

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

  Log Message:
  -----------
  [X86][SSE] Simplify MOVMSK patterns based on comparison

An initial patch adding combineSetCCMOVMSK to simplify MOVMSK and its vector input based on the comparison of the MOVMSK result.

This first stage just adds support for some simple MOVMSK(PACKSSBW()) cases where we remove the PACKSS if we're comparing ne/eq zero (any_of patterns), allowing us to directly compare against the v8i16 source vector(s) bitcasted to v16i8, with suitable masking to take into account of which signbits are valid.

Future combines could peek through further PACKSS, target shuffles, handle all_of patterns (ne/eq -1), optimize to a PTEST op, etc.

Differential Revision: https://reviews.llvm.org/D81171




More information about the All-commits mailing list