[PowerPC] convert memmove to milicode call .___memmove64[PR] in 64-bit mode#167334
Merged
[PowerPC] convert memmove to milicode call .___memmove64[PR] in 64-bit mode#167334
Conversation
Member
|
@llvm/pr-subscribers-llvm-ir @llvm/pr-subscribers-backend-powerpc Author: zhijian lin (diggerlin) ChangesTableGen: Allow defining sets of runtime libraries 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 Full diff: https://github.com/llvm/llvm-project/pull/167334.diff 2 Files Affected:
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
|
arsenm
approved these changes
Nov 10, 2025
ckoparkar
added a commit
to ckoparkar/llvm-project
that referenced
this pull request
Nov 10, 2025
* main: (63 commits) [libc++] Inline vector::__append into resize (llvm#162086) [Flang][OpenMP] Move char box bounds generation for Maps to DirectiveCommons.h (llvm#165918) RuntimeLibcalls: Add entries for vector sincospi functions (llvm#166981) [X86] _mm_addsub_pd is not valid for constexpr (llvm#167363) [CIR] Re-land: Recognize constant aggregate initialization of auto vars (llvm#167033) [gn build] Port d2521f1 [gn build] Port caed089 [gn build] Port 315d705 [gn build] Port 2345b7d [PowerPC] convert memmove to milicode call .___memmove64[PR] in 64-bit mode (llvm#167334) [HLSL] Add internal linkage attribute to resources (llvm#166844) AMDGPU: Update test after e95f6fa [bazel] Port llvm#166980: TLI/VectorLibrary refactor (llvm#167354) [libc++] Split macros related to hardening into their own header (llvm#167069) [libc++][NFC] Remove unused imports from generate_feature_test_macro_components.py (llvm#159591) [CIR][NFC] Add test for Complex imag with GUN extension (llvm#167215) [BOLT][AArch64] Add more heuristics on epilogue determination (llvm#167077) RegisterCoalescer: Enable terminal rule by default for AMDGPU (llvm#161621) Revert "[clang] Refactor option-related code from clangDriver into new clangOptions library" (llvm#167348) [libc++][docs] Update to refer to P3355R2 (llvm#167267) ...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 PPC64AIXCallListdef ___memmove32 : RuntimeLibcallImpl<MEMCPY>in PPC32AIXCallListsince there is function