[llvm] AMDGPU coverity fixes (PR #182013)

Rafał Rudnicki via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 20 01:08:16 PST 2026


================
@@ -273,7 +260,7 @@ void AMDGPULowerVGPREncoding::computeMode(ModeTy &NewMode,
     // Skip tied uses of src2 of VOP2, these will be handled along with defs and
     // only vdst bit affects these operands. We cannot skip tied uses of VOP3,
     // these uses are real even if must match the vdst.
-    if (Ops[I] == AMDGPU::OpName::src2 && !Op->isDef() && Op->isTied() &&
+    if (Ops[I] == AMDGPU::OpName::src2 && Op && !Op->isDef() && Op->isTied() &&
----------------
bratpiorka wrote:

You’re right - Op can only be null when MSBits is empty, but in that case the execution won’t reach this point because of the continue. Reverted

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


More information about the llvm-commits mailing list