[llvm] [PowerPC] convert memmove to milicode call in 64-bit mode (PR #167334)
zhijian lin via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 10 07:52:53 PST 2025
https://github.com/diggerlin created https://github.com/llvm/llvm-project/pull/167334
[TableGen: Allow defining sets of runtime libraries](https://github.com/llvm/llvm-project/pull/144978#top) break the conversion of bl memmove call to milicode bl .___memmove64[PR] in 64--bit mode, the patch fix the problem.
we do not need to define the
>From 77b6e039535b8627a8133dca7675430ac1fcf1f3 Mon Sep 17 00:00:00 2001
From: zhijian <zhijian at ca.ibm.com>
Date: Mon, 10 Nov 2025 15:57:09 +0000
Subject: [PATCH] convert memmove to milicode call in 64-bit mode
---
llvm/include/llvm/IR/RuntimeLibcalls.td | 2 +-
llvm/test/CodeGen/PowerPC/milicode64.ll | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/llvm/include/llvm/IR/RuntimeLibcalls.td b/llvm/include/llvm/IR/RuntimeLibcalls.td
index 24c1b035d0dda..e3da058a3ce20 100644
--- a/llvm/include/llvm/IR/RuntimeLibcalls.td
+++ b/llvm/include/llvm/IR/RuntimeLibcalls.td
@@ -2333,7 +2333,7 @@ defset list<RuntimeLibcallImpl> PPCRuntimeLibcalls = {
defset list<RuntimeLibcallImpl> PPC64AIXCallList = {
def ___memcmp64 : RuntimeLibcallImpl<MEMCMP>;
- def ___memmove64 : RuntimeLibcallImpl<MEMCPY>;
+ def ___memmove64 : RuntimeLibcallImpl<MEMMOVE>;
def ___memset64 : RuntimeLibcallImpl<MEMSET>;
def ___bzero64 : RuntimeLibcallImpl<BZERO>;
def ___strlen64 : RuntimeLibcallImpl<STRLEN>;
diff --git a/llvm/test/CodeGen/PowerPC/milicode64.ll b/llvm/test/CodeGen/PowerPC/milicode64.ll
index f7814a424e0b9..2dbf4140a0fa4 100644
--- a/llvm/test/CodeGen/PowerPC/milicode64.ll
+++ b/llvm/test/CodeGen/PowerPC/milicode64.ll
@@ -156,7 +156,7 @@ define ptr @test_memmove(ptr noundef %destination, ptr noundef %source, i64 noun
; CHECK-AIX-64-P9-NEXT: std r3, 128(r1)
; CHECK-AIX-64-P9-NEXT: std r4, 120(r1)
; CHECK-AIX-64-P9-NEXT: std r5, 112(r1)
-; CHECK-AIX-64-P9-NEXT: bl .memmove[PR]
+; CHECK-AIX-64-P9-NEXT: bl .___memmove64[PR]
; CHECK-AIX-64-P9-NEXT: nop
; CHECK-AIX-64-P9-NEXT: mr r3, r31
; CHECK-AIX-64-P9-NEXT: ld r31, 136(r1) # 8-byte Folded Reload
More information about the llvm-commits
mailing list