[llvm] [SPIR-V] Consistent handling of TargetExtTypes in emit-intrinsics (PR #135682)

via llvm-commits llvm-commits at lists.llvm.org
Fri May 23 14:05:05 PDT 2025


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 HEAD~1 HEAD --extensions cpp -- 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/SPIRVEmitIntrinsics.cpp b/llvm/lib/Target/SPIRV/SPIRVEmitIntrinsics.cpp
index 92ceda660..50c93d8f0 100644
--- a/llvm/lib/Target/SPIRV/SPIRVEmitIntrinsics.cpp
+++ b/llvm/lib/Target/SPIRV/SPIRVEmitIntrinsics.cpp
@@ -1958,7 +1958,8 @@ void SPIRVEmitIntrinsics::insertAssignTypeIntrs(Instruction *I,
         } else {
           Value *OpTyVal = Op;
           if (OpTy->isTargetExtTy()) {
-            // We need to do this in order to be consistent with how target ext types are handled in `processInstrAfterVisit`
+            // We need to do this in order to be consistent with how target ext
+            // types are handled in `processInstrAfterVisit`
             OpTyVal = getNormalizedPoisonValue(OpTy);
           }
           CallInst *AssignCI =
@@ -2078,7 +2079,8 @@ void SPIRVEmitIntrinsics::processInstrAfterVisit(Instruction *I,
     Type *OpElemTy = GR->findDeducedElementType(Op);
     Value *NewOp = Op;
     if (OpTy->isTargetExtTy()) {
-      // Since this value is replaced by poison, we need to do the same in `insertAssignTypeIntrs`.
+      // Since this value is replaced by poison, we need to do the same in
+      // `insertAssignTypeIntrs`.
       Value *OpTyVal = getNormalizedPoisonValue(OpTy);
       NewOp = buildIntrWithMD(Intrinsic::spv_track_constant,
                               {OpTy, OpTyVal->getType()}, Op, OpTyVal, {}, B);

``````````

</details>


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


More information about the llvm-commits mailing list