[all-commits] [llvm/llvm-project] b95f66: [X86][SSE] LowerRotate - perform modulo on the amo...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Sun Jul 25 09:41:31 PDT 2021


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

  Changed paths:
    M llvm/lib/Target/X86/X86ISelLowering.cpp
    M llvm/test/CodeGen/X86/min-legal-vector-width.ll
    M llvm/test/CodeGen/X86/vector-fshl-256.ll
    M llvm/test/CodeGen/X86/vector-fshl-rot-128.ll
    M llvm/test/CodeGen/X86/vector-fshl-rot-256.ll
    M llvm/test/CodeGen/X86/vector-fshl-rot-sub128.ll
    M llvm/test/CodeGen/X86/vector-fshr-rot-sub128.ll
    M llvm/test/CodeGen/X86/vector-rotate-128.ll
    M llvm/test/CodeGen/X86/vector-rotate-256.ll

  Log Message:
  -----------
  [X86][SSE] LowerRotate - perform modulo on the amount splat source directly.

If the rotation amount is a known splat, perform the modulo on the splat source, and then perform the splat. That way the amount-extension performed later by LowerScalarVariableShift can fold the splats away without any multiple-use issues.

Fixes one of the concerns raised on D104156




More information about the All-commits mailing list