[all-commits] [llvm/llvm-project] 8bc2d1: [X86] canonicalizeShuffleWithOp - don't fold VPERM...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Tue Apr 2 10:39:09 PDT 2024


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

  Changed paths:
    M llvm/lib/Target/X86/X86ISelLowering.cpp
    M llvm/test/CodeGen/X86/shuffle-vs-trunc-256.ll
    M llvm/test/CodeGen/X86/vector-interleaved-store-i8-stride-5.ll
    M llvm/test/CodeGen/X86/vector-interleaved-store-i8-stride-7.ll

  Log Message:
  -----------
  [X86] canonicalizeShuffleWithOp - don't fold VPERMI(BINOP(X,Y)) -> BINOP(VPERMI(X),VPERMI(Y))

VPERMI (VPERMQ/PD) is nearly always lane-crossing and poorly merges with target shuffles (other than itself).

For now, I've restricted VPERMI to only merge with itself, constants, loads and splats.

We might be able to merge with a few other special cases (AND/ANDNP with constant?), which could help the shuffle-vs-trunc-256.ll AVX512VL regression, but since that now gives similar codegen to the other AVX512 variants, I'd prefer to improve the shuffle lowering for that properly.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list