[llvm] [SPIRV] Audit `select` Result in SPIRVInstructionSelector (PR #115193)

Sarah Spall via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 7 14:52:01 PST 2024


================
@@ -1038,12 +1040,13 @@ bool SPIRVInstructionSelector::selectMemOperation(Register ResVReg,
     Register VarReg = MRI->createGenericVirtualRegister(LLT::scalar(64));
     GR.add(GV, GR.CurMF, VarReg);
 
-    BuildMI(*I.getParent(), I, I.getDebugLoc(), TII.get(SPIRV::OpVariable))
-        .addDef(VarReg)
-        .addUse(GR.getSPIRVTypeID(VarTy))
-        .addImm(SPIRV::StorageClass::UniformConstant)
-        .addUse(Const)
-        .constrainAllUses(TII, TRI, RBI);
+    Result &=
----------------
spall wrote:

I would just declare Result here.

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


More information about the llvm-commits mailing list