[llvm] [WebAssembly][GlobalISel] Part 2 - CallLowering `lowerFormalArguments` (PR #180263)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Feb 8 01:12:19 PST 2026
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff origin/main HEAD --extensions cpp -- llvm/lib/Target/WebAssembly/GISel/WebAssemblyCallLowering.cpp --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Target/WebAssembly/GISel/WebAssemblyCallLowering.cpp b/llvm/lib/Target/WebAssembly/GISel/WebAssemblyCallLowering.cpp
index 4af9d12e7..9450749a4 100644
--- a/llvm/lib/Target/WebAssembly/GISel/WebAssemblyCallLowering.cpp
+++ b/llvm/lib/Target/WebAssembly/GISel/WebAssemblyCallLowering.cpp
@@ -112,16 +112,16 @@ static unsigned getWASMArgumentOpcode(MVT ArgType) {
static LLT getLLTForWasmMVT(MVT Ty, const DataLayout &DL) {
if (Ty == MVT::externref) {
return LLT::pointer(
- WebAssembly::WasmAddressSpace::WASM_ADDRESS_SPACE_EXTERNREF,
- DL.getPointerSizeInBits(WebAssembly::WasmAddressSpace::WASM_ADDRESS_SPACE_EXTERNREF)
- );
+ WebAssembly::WasmAddressSpace::WASM_ADDRESS_SPACE_EXTERNREF,
+ DL.getPointerSizeInBits(
+ WebAssembly::WasmAddressSpace::WASM_ADDRESS_SPACE_EXTERNREF));
}
if (Ty == MVT::funcref) {
return LLT::pointer(
- WebAssembly::WasmAddressSpace::WASM_ADDRESS_SPACE_FUNCREF,
- DL.getPointerSizeInBits(WebAssembly::WasmAddressSpace::WASM_ADDRESS_SPACE_FUNCREF)
- );
+ WebAssembly::WasmAddressSpace::WASM_ADDRESS_SPACE_FUNCREF,
+ DL.getPointerSizeInBits(
+ WebAssembly::WasmAddressSpace::WASM_ADDRESS_SPACE_FUNCREF));
}
return llvm::getLLTForMVT(Ty);
@@ -180,7 +180,8 @@ bool WebAssemblyCallLowering::lowerFormalArguments(
for (ArgInfo &Arg : SplitArgs) {
const EVT OrigVT = TLI.getValueType(DL, Arg.Ty);
const MVT NewVT = TLI.getRegisterTypeForCallingConv(Ctx, CallConv, OrigVT);
- const LLT OrigLLT = getLLTForType(*OrigVT.getTypeForEVT(F.getContext()), DL);
+ const LLT OrigLLT =
+ getLLTForType(*OrigVT.getTypeForEVT(F.getContext()), DL);
const LLT NewLLT = getLLTForWasmMVT(NewVT, DL);
// If we need to split the type over multiple regs, check it's a scenario
``````````
</details>
https://github.com/llvm/llvm-project/pull/180263
More information about the llvm-commits
mailing list