[all-commits] [llvm/llvm-project] 911490: [x86] improve codegen for non-splat bit-masked vec...

RotateRight via All-commits all-commits at lists.llvm.org
Wed Jul 8 05:23:21 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 91149002872f968673c8f01f641dfe11dc4a4d7c
      https://github.com/llvm/llvm-project/commit/91149002872f968673c8f01f641dfe11dc4a4d7c
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2020-07-08 (Wed, 08 Jul 2020)

  Changed paths:
    M llvm/lib/Target/X86/X86ISelLowering.cpp
    M llvm/test/CodeGen/X86/vselect-pcmp.ll

  Log Message:
  -----------
  [x86] improve codegen for non-splat bit-masked vector compare and select (PR46531)

vselect ((X & Pow2C) == 0), LHS, RHS --> vselect ((shl X, C') < 0), RHS, LHS

Follow-up to D83073 - the non-splat mask cases where we actually see an
improvement are quite limited from what I can tell. AVX1 needs multiply
and blend capabilities and AVX2 needs vector shift and blend capabilities.
The intersection of those 2 constraints is only vectors with 32-bit or
64-bit elements.

XOP is/was better.

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




More information about the All-commits mailing list