[all-commits] [llvm/llvm-project] ccedf2: [PowerPC] convert memmove to milicode call .___me...

zhijian lin via All-commits all-commits at lists.llvm.org
Mon Nov 10 10:31:01 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ccedf259fc0877873cd337deb87b135dfaac753d
      https://github.com/llvm/llvm-project/commit/ccedf259fc0877873cd337deb87b135dfaac753d
  Author: zhijian lin <zhijian at ca.ibm.com>
  Date:   2025-11-10 (Mon, 10 Nov 2025)

  Changed paths:
    M llvm/include/llvm/IR/RuntimeLibcalls.td
    M llvm/test/CodeGen/PowerPC/milicode64.ll

  Log Message:
  -----------
  [PowerPC] convert memmove to milicode call  .___memmove64[PR]  in 64-bit mode (#167334)

conversion of bl memmove call to milicode bl .___memmove64[PR] in
64--bit mode is broken , the patch fix the problem.
 
in the llvm/include/llvm/IR/RuntimeLibcalls.td, we do not need to define
the

 `def ___memmove64 : RuntimeLibcallImpl<MEMCPY>` in PPC64AIXCallList 
` def ___memmove32 : RuntimeLibcallImpl<MEMCPY>` in PPC32AIXCallList
 
 since there is function 
 
```
   /// Return a function impl compatible with RTLIB::MEMCPY, or
  /// RTLIB::Unsupported if fully unsupported.
  RTLIB::LibcallImpl getMemcpyImpl() const {
    RTLIB::LibcallImpl Memcpy = getLibcallImpl(RTLIB::MEMCPY);
    if (Memcpy == RTLIB::Unsupported) {
      // Fallback to memmove if memcpy isn't available.
      return getLibcallImpl(RTLIB::MEMMOVE);
    }

    return Memcpy;
  }
```



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list