[all-commits] [llvm/llvm-project] 37bc62: [X86] lowerShuffleAsLanePermuteAndRepeatedMask - r...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Sun Jan 29 03:04:09 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 37bc62ed0a24303aa572155009358b8937ab8b4c
      https://github.com/llvm/llvm-project/commit/37bc62ed0a24303aa572155009358b8937ab8b4c
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2023-01-29 (Sun, 29 Jan 2023)

  Changed paths:
    M llvm/lib/Target/X86/X86ISelLowering.cpp
    M llvm/test/CodeGen/X86/any_extend_vector_inreg_of_broadcast.ll
    M llvm/test/CodeGen/X86/any_extend_vector_inreg_of_broadcast_from_memory.ll
    M llvm/test/CodeGen/X86/vector-interleaved-load-i16-stride-6.ll
    M llvm/test/CodeGen/X86/vector-interleaved-load-i32-stride-5.ll
    M llvm/test/CodeGen/X86/vector-interleaved-load-i32-stride-6.ll
    M llvm/test/CodeGen/X86/vector-interleaved-load-i32-stride-7.ll
    M llvm/test/CodeGen/X86/vector-interleaved-load-i8-stride-6.ll
    M llvm/test/CodeGen/X86/vector-interleaved-store-i32-stride-7.ll
    M llvm/test/CodeGen/X86/zero_extend_vector_inreg_of_broadcast.ll
    M llvm/test/CodeGen/X86/zero_extend_vector_inreg_of_broadcast_from_memory.ll

  Log Message:
  -----------
  [X86] lowerShuffleAsLanePermuteAndRepeatedMask - retain the per-lane undef elements and don't just copy the repeated mask

lowerShuffleAsLanePermuteAndRepeatedMask expands a shuffle from shuffle(x,y,mask) to shuffle(shuffle(x,y,lanemask1),shuffle(x,y,lanemask2),repeatedinlanemask)

However, we weren't making use of the fact that elements of the original mask might be undef - instead of fully applying the entire repeatedinlanemask to every lane, we can simplify the mask if we never demanded that element in the original mask.

Yet another improvement addressing regressions from D127115

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




More information about the All-commits mailing list