[all-commits] [llvm/llvm-project] ad6024: [PowerPC] Custom lower rotl v1i128 to vector_shuffle.

Esme via All-commits all-commits at lists.llvm.org
Wed Jun 17 18:33:08 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: ad6024e29fe7a48c5182bb1ce3a410d4b12f7850
      https://github.com/llvm/llvm-project/commit/ad6024e29fe7a48c5182bb1ce3a410d4b12f7850
  Author: Esme-Yi <esme.yi at ibm.com>
  Date:   2020-06-18 (Thu, 18 Jun 2020)

  Changed paths:
    M llvm/lib/Target/PowerPC/PPCISelLowering.cpp
    M llvm/lib/Target/PowerPC/PPCISelLowering.h
    M llvm/test/CodeGen/PowerPC/pr45628.ll

  Log Message:
  -----------
  [PowerPC] Custom lower rotl v1i128 to vector_shuffle.

Summary: A bug is reported in bugzilla-45628, where the swap_with_shift case can’t be matched to a single HW instruction xxswapd as expected.
In fact the case matches the idiom of rotate. We have MatchRotate to handle an ‘or’ of two operands and generate a rot[lr] if the case matches the idiom of rotate. While PPC doesn’t support ROTL v1i128. We can custom lower ROTL v1i128 to the vector_shuffle. The vector_shuffle will be matched to a single HW instruction during the phase of instruction selection.

Reviewed By: steven.zhang

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




More information about the All-commits mailing list