[all-commits] [llvm/llvm-project] 51a12d: [X86][SSE] matchShuffleWithPACK - avoid poison pol...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Sun Jul 18 06:32:21 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 51a12d2ff097837ba05dfeaea832d7b5a738db6c
      https://github.com/llvm/llvm-project/commit/51a12d2ff097837ba05dfeaea832d7b5a738db6c
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2021-07-18 (Sun, 18 Jul 2021)

  Changed paths:
    M llvm/lib/Target/X86/X86ISelLowering.cpp
    M llvm/test/CodeGen/X86/vector-shuffle-512-v64.ll

  Log Message:
  -----------
  [X86][SSE] matchShuffleWithPACK - avoid poison pollution from bitcasting multiple elements together.

D106053 exposed that we've not been taking into account that by bitcasting smaller elements together and then performing a ComputeKnownBits on the result we'd be allowing a poison element to influence other neighbouring elements being used in the pack. Instead we now peek through any existing bitcast to ensure that the source type already matches the width source of the pack node we're trying to match.

This has also been a chance to stop matchShuffleWithPACK creating unused nodes on the fly which could affect oneuse tests during shuffle lowering/combining.

The only regression we're seeing is due to being unable to peek through a bitcast as its on the other side of a extract_subvector - which should go away once we finally allow shuffle combining across different vector widths (by making matchShuffleWithPACK using const SelectionDAG& we've gotten closer to this - see PR45974).




More information about the All-commits mailing list