[llvm] [SPIR-V] Improve type inference for a known instruction's builtin: OpGroupAsyncCopy (PR #96895)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 1 05:02:05 PDT 2024
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 0f24a462386409c1d907aefb9d8a58481cb71933 be174126a27c02d242ee813c65628d4d311de38c -- llvm/lib/Target/SPIRV/SPIRVBuiltins.cpp llvm/lib/Target/SPIRV/SPIRVBuiltins.h llvm/lib/Target/SPIRV/SPIRVEmitIntrinsics.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Target/SPIRV/SPIRVBuiltins.cpp b/llvm/lib/Target/SPIRV/SPIRVBuiltins.cpp
index c99165e786..5e5fa26a0f 100644
--- a/llvm/lib/Target/SPIRV/SPIRVBuiltins.cpp
+++ b/llvm/lib/Target/SPIRV/SPIRVBuiltins.cpp
@@ -2406,17 +2406,18 @@ mapBuiltinToOpcode(const StringRef DemangledCall,
case SPIRV::AsyncCopy:
case SPIRV::LoadStore:
case SPIRV::CoopMatr:
- if (const auto *R = SPIRV::lookupNativeBuiltin(Call->Builtin->Name, Call->Builtin->Set))
+ if (const auto *R =
+ SPIRV::lookupNativeBuiltin(Call->Builtin->Name, Call->Builtin->Set))
return std::make_tuple(Call->Builtin->Group, R->Opcode, 0);
break;
case SPIRV::Extended:
- if (const auto *R =
- SPIRV::lookupExtendedBuiltin(Call->Builtin->Name, Call->Builtin->Set))
+ if (const auto *R = SPIRV::lookupExtendedBuiltin(Call->Builtin->Name,
+ Call->Builtin->Set))
return std::make_tuple(Call->Builtin->Group, 0, R->Number);
break;
case SPIRV::VectorLoadStore:
- if (const auto *R =
- SPIRV::lookupVectorLoadStoreBuiltin(Call->Builtin->Name, Call->Builtin->Set))
+ if (const auto *R = SPIRV::lookupVectorLoadStoreBuiltin(Call->Builtin->Name,
+ Call->Builtin->Set))
return std::make_tuple(SPIRV::Extended, 0, R->Number);
break;
case SPIRV::Group:
@@ -2440,7 +2441,8 @@ mapBuiltinToOpcode(const StringRef DemangledCall,
case SPIRV::Select:
return std::make_tuple(Call->Builtin->Group, TargetOpcode::G_SELECT, 0);
case SPIRV::Construct:
- return std::make_tuple(Call->Builtin->Group, SPIRV::OpCompositeConstruct, 0);
+ return std::make_tuple(Call->Builtin->Group, SPIRV::OpCompositeConstruct,
+ 0);
case SPIRV::KernelClock:
return std::make_tuple(Call->Builtin->Group, SPIRV::OpReadClockKHR, 0);
default:
``````````
</details>
https://github.com/llvm/llvm-project/pull/96895
More information about the llvm-commits
mailing list