[llvm] [SPIR-V] Improve type inference, fix mismatched machine function context (PR #88254)

via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 10 03:47:35 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 23b058cb7f2da7778eb66dbe44d5e60390264e4b 617bd2d5e0f2ddf1a9fb7e6a155ef794bf13edc5 -- llvm/lib/Target/SPIRV/SPIRVEmitIntrinsics.cpp llvm/lib/Target/SPIRV/SPIRVGlobalRegistry.cpp llvm/lib/Target/SPIRV/SPIRVGlobalRegistry.h llvm/lib/Target/SPIRV/SPIRVISelLowering.cpp llvm/lib/Target/SPIRV/SPIRVUtils.cpp llvm/lib/Target/SPIRV/SPIRVUtils.h
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/lib/Target/SPIRV/SPIRVEmitIntrinsics.cpp b/llvm/lib/Target/SPIRV/SPIRVEmitIntrinsics.cpp
index 8113de6d7f..095729f645 100644
--- a/llvm/lib/Target/SPIRV/SPIRVEmitIntrinsics.cpp
+++ b/llvm/lib/Target/SPIRV/SPIRVEmitIntrinsics.cpp
@@ -1161,7 +1161,8 @@ bool SPIRVEmitIntrinsics::runOnFunction(Function &Func) {
       continue;
     for (const auto &Rec : CollectedTys) {
       if (!Rec.first->use_empty()) {
-        Instruction *User = dyn_cast<Instruction>(Rec.first->use_begin()->get());
+        Instruction *User =
+            dyn_cast<Instruction>(Rec.first->use_begin()->get());
         if (!User)
           continue;
         Type *OpTy = Rec.first->getType();

``````````

</details>


https://github.com/llvm/llvm-project/pull/88254


More information about the llvm-commits mailing list