[PATCH] D111729: [SystemZ] Bugfix and refactorization of mem-mem operations

Jonas Paulsson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 13 08:30:02 PDT 2021


jonpa created this revision.
jonpa added a reviewer: uweigand.
Herald added subscribers: steven.zhang, dmgreen, hiraditya.
jonpa requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

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 be performed of the operation.

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.


https://reviews.llvm.org/D111729

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D111729.379406.patch
Type: text/x-patch
Size: 32843 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211013/62a5da06/attachment.bin>


More information about the llvm-commits mailing list