[llvm] [SPIR-V] Do not use OpenCL metadata for ptr element type resolution (PR #82678)

Michal Paszkowski via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 28 05:17:22 PST 2024


================
@@ -597,7 +636,7 @@ void SPIRVEmitIntrinsics::insertAssignTypeIntrs(Instruction *I) {
       if (isa<UndefValue>(Op) && Op->getType()->isAggregateType())
         buildIntrWithMD(Intrinsic::spv_assign_type, {IRB->getInt32Ty()}, Op,
                         UndefValue::get(IRB->getInt32Ty()), {});
-      else
+      else if (!isa<Instruction>(Op)) // TODO: This case could be removed
----------------
michalpaszkowski wrote:

I will remove/refactor this in the next patch, so that it does not obscure the changes here

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


More information about the llvm-commits mailing list