[all-commits] [llvm/llvm-project] 00baad: [SystemZ] Bugfix and refactorization of mem-mem op...

Jonas Paulsson via All-commits all-commits at lists.llvm.org
Thu Oct 14 01:38:16 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 00baad35b2a366437e210a0701173247a3ad5468
      https://github.com/llvm/llvm-project/commit/00baad35b2a366437e210a0701173247a3ad5468
  Author: Jonas Paulsson <paulsson at linux.vnet.ibm.com>
  Date:   2021-10-14 (Thu, 14 Oct 2021)

  Changed paths:
    M llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
    M llvm/lib/Target/SystemZ/SystemZInstrFP.td
    M llvm/lib/Target/SystemZ/SystemZInstrFormats.td
    M llvm/lib/Target/SystemZ/SystemZInstrInfo.td
    M llvm/lib/Target/SystemZ/SystemZOperators.td
    M llvm/lib/Target/SystemZ/SystemZSelectionDAGInfo.cpp
    M llvm/test/CodeGen/SystemZ/memset-05.ll
    M llvm/test/CodeGen/SystemZ/mverify-optypes.mir

  Log Message:
  -----------
  [SystemZ] Bugfix and refactorization of mem-mem operations

This patch fixes the bug that consisted of treating variable / immediate
length mem operations (such as memcpy, memset, ...) differently. The variable
length case needs to have the length minus 1 passed due to the use of EXRL
target instructions. However, the DAGCombiner can convert a register length
argument into a constant one, and whenever that happened one byte too little
would end up being performed.

This is also a refactorization by reducing the number of opcodes and variants
involved. For any opcode (variable or constant length), only the length minus
one is passed on to the ISD node. The rest of the logic is now instead
handled during isel pseudo expansion.

Review: Ulrich Weigand

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


  Commit: a33e4c8ae925e99e565b2ca5dcda8ec2edbb78ee
      https://github.com/llvm/llvm-project/commit/a33e4c8ae925e99e565b2ca5dcda8ec2edbb78ee
  Author: Jonas Paulsson <paulsson at linux.vnet.ibm.com>
  Date:   2021-10-14 (Thu, 14 Oct 2021)

  Changed paths:
    M llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
    M llvm/lib/Target/SystemZ/SystemZInstrFormats.td
    M llvm/lib/Target/SystemZ/SystemZSelectionDAGInfo.cpp
    M llvm/test/CodeGen/SystemZ/loop-03.ll
    M llvm/test/CodeGen/SystemZ/memcmp-01.ll
    M llvm/test/CodeGen/SystemZ/memcpy-01.ll
    M llvm/test/CodeGen/SystemZ/tail-call-mem-intrinsics.ll

  Log Message:
  -----------
  [SystemZ] Reapply memcmp and memcpy patches.

This reverts 3562076 and includes some refactoring as well.

Review: Ulrich Weigand

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


Compare: https://github.com/llvm/llvm-project/compare/7106f588567b...a33e4c8ae925


More information about the All-commits mailing list