[llvm] [SPIR-V] Partial revert of d40eb0a (PR #74755)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 7 12:21:13 PST 2023
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-backend-spir-v
Author: Natalie Chouinard (sudonatalie)
<details>
<summary>Changes</summary>
This part of the #<!-- -->74660 patch was incorrect and shouldn't have been changed since this usage of `isOpaque()` is not one of `PointerType`'s functions.
---
Full diff: https://github.com/llvm/llvm-project/pull/74755.diff
1 Files Affected:
- (modified) llvm/lib/Target/SPIRV/SPIRVGlobalRegistry.cpp (+3-1)
``````````diff
diff --git a/llvm/lib/Target/SPIRV/SPIRVGlobalRegistry.cpp b/llvm/lib/Target/SPIRV/SPIRVGlobalRegistry.cpp
index f04ab4e3ebfb9e..d450613196f3e4 100644
--- a/llvm/lib/Target/SPIRV/SPIRVGlobalRegistry.cpp
+++ b/llvm/lib/Target/SPIRV/SPIRVGlobalRegistry.cpp
@@ -690,7 +690,9 @@ SPIRVType *SPIRVGlobalRegistry::createSPIRVType(
return getOpTypeArray(Ty->getArrayNumElements(), El, MIRBuilder, EmitIR);
}
if (auto SType = dyn_cast<StructType>(Ty)) {
- return getOpTypeOpaque(SType, MIRBuilder);
+ if (SType->isOpaque())
+ return getOpTypeOpaque(SType, MIRBuilder);
+ return getOpTypeStruct(SType, MIRBuilder, EmitIR);
}
if (auto FType = dyn_cast<FunctionType>(Ty)) {
SPIRVType *RetTy = findSPIRVType(FType->getReturnType(), MIRBuilder);
``````````
</details>
https://github.com/llvm/llvm-project/pull/74755
More information about the llvm-commits
mailing list