================
@@ -2507,7 +2542,7 @@ void
SPIRVEmitIntrinsics::processGlobalValue(GlobalVariable &GV,
{GV.getType(), Ty}, {&GV, Const});
InitInst->setArgOperand(1, InitOp);
}
- if (!Init && GV.use_empty())
+ if (!Init && (GV.use_empty() || hasOnlyArtificialUses(GV)))
----------------
jmmartinez wrote:
```suggestion
if (!Init && hasOnlyArtificialUses(GV))
```
https://github.com/llvm/llvm-project/pull/196404
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits