[all-commits] [llvm/llvm-project] 06617c: [X86] Add lowerShuffleAsBitRotate (PR44379)

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Mon Feb 10 08:17:10 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 06617c452204e4b84c0f70407aa4ecd32d3b295f
      https://github.com/llvm/llvm-project/commit/06617c452204e4b84c0f70407aa4ecd32d3b295f
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2020-02-10 (Mon, 10 Feb 2020)

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

  Log Message:
  -----------
  [X86] Add lowerShuffleAsBitRotate (PR44379)

As noted on PR44379, we didn't attempt to lower vector shuffles using bit rotations on XOP/AVX512F targets.

This patch lowers to uniform ISD:ROTL nodes - ROTR isn't supported by XOP and they are interchangeable for constant values anyway.

There might be cases where targets without ISD:ROTL support would benefit from this (expanding to SRL+SHL+OR), which I'll investigate in a future patch.

REAPPLIED rGe82e17d4d4ca after reversion at rG39eade73a567 - fixed offset matching in matchShuffleAsBitRotate.




More information about the All-commits mailing list