Skip to content

Conversation

@arsenm
Copy link
Contributor

@arsenm arsenm commented Nov 8, 2025

No description provided.

Copy link
Contributor Author

arsenm commented Nov 8, 2025

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@llvmbot
Copy link
Member

llvmbot commented Nov 8, 2025

@llvm/pr-subscribers-llvm-selectiondag
@llvm/pr-subscribers-llvm-ir

@llvm/pr-subscribers-llvm-transforms

Author: Matt Arsenault (arsenm)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/167088.diff

2 Files Affected:

  • (modified) llvm/include/llvm/IR/RuntimeLibcalls.td (+1)
  • (added) llvm/test/Transforms/Util/DeclareRuntimeLibcalls/xcore.ll (+6)
diff --git a/llvm/include/llvm/IR/RuntimeLibcalls.td b/llvm/include/llvm/IR/RuntimeLibcalls.td
index ad11216c6ee9d..acc9a1bfc0f5b 100644
--- a/llvm/include/llvm/IR/RuntimeLibcalls.td
+++ b/llvm/include/llvm/IR/RuntimeLibcalls.td
@@ -3349,6 +3349,7 @@ def XCoreSystemLibrary
     (add DefaultRuntimeLibcallImpls,
          exp10f, exp10, exp10l_f128,
          __memcpy_4,
+         iprintf, siprintf, fiprintf,
          LibcallImpls<(add LibmF128Libcalls, LibmF128FiniteLibcalls), isGNUEnvironment>
 )>;
 
diff --git a/llvm/test/Transforms/Util/DeclareRuntimeLibcalls/xcore.ll b/llvm/test/Transforms/Util/DeclareRuntimeLibcalls/xcore.ll
new file mode 100644
index 0000000000000..c1326ac980f4b
--- /dev/null
+++ b/llvm/test/Transforms/Util/DeclareRuntimeLibcalls/xcore.ll
@@ -0,0 +1,6 @@
+; REQUIRES: webassembly-registered-target
+; RUN: opt -S -passes=declare-runtime-libcalls -mtriple=xcore < %s | FileCheck %s
+
+; CHECK: declare void @fiprintf(...)
+; CHECK: declare void @iprintf(...)
+; CHECK: declare void @siprintf(...)

@arsenm arsenm force-pushed the users/arsenm/runtime-libcalls/add-small-printf-emscripten branch from be6441e to b54d80c Compare November 10, 2025 18:18
@arsenm arsenm force-pushed the users/arsenm/xcore/add-iprintf-runtime-libcalls branch from 05dacae to 41af6ea Compare November 10, 2025 18:18
@arsenm arsenm force-pushed the users/arsenm/runtime-libcalls/add-small-printf-emscripten branch from b54d80c to f0a641e Compare November 10, 2025 19:22
@arsenm arsenm force-pushed the users/arsenm/xcore/add-iprintf-runtime-libcalls branch from 41af6ea to 3f205fa Compare November 10, 2025 19:22
Copy link
Collaborator

@RKSimon RKSimon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@arsenm arsenm force-pushed the users/arsenm/runtime-libcalls/add-small-printf-emscripten branch from f0a641e to 0f391f4 Compare November 12, 2025 00:57
@arsenm arsenm force-pushed the users/arsenm/xcore/add-iprintf-runtime-libcalls branch 2 times, most recently from 17a21fd to 9dc959e Compare November 12, 2025 02:11
@arsenm arsenm force-pushed the users/arsenm/runtime-libcalls/add-small-printf-emscripten branch from 0f391f4 to 2eee7b2 Compare November 12, 2025 02:11
@arsenm arsenm force-pushed the users/arsenm/runtime-libcalls/add-small-printf-emscripten branch from 2eee7b2 to a67707c Compare November 12, 2025 03:24
@arsenm arsenm force-pushed the users/arsenm/xcore/add-iprintf-runtime-libcalls branch from 9dc959e to c3a79e9 Compare November 12, 2025 03:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants