[llvm] [SPIR-V] Implement correct zeroinitializer for extension types in SPIR-V Backend (PR #93607)

Vyacheslav Levytskyy via llvm-commits llvm-commits at lists.llvm.org
Wed May 29 00:43:03 PDT 2024


================
@@ -1191,8 +1191,7 @@ void SPIRVEmitIntrinsics::processInstrAfterVisit(Instruction *I,
       B.SetInsertPoint(I);
       Value *OpTyVal = Op;
       if (Op->getType()->isTargetExtTy())
-        OpTyVal = Constant::getNullValue(
-            IntegerType::get(I->getContext(), GR->getPointerSize()));
+        OpTyVal = UndefValue::get(Op->getType());
----------------
VyacheslavLevytskyy wrote:

Thank you for the suggestion, applied.

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


More information about the llvm-commits mailing list