diff options
author | Mark Menzynski <[email protected]> | 2019-07-19 13:09:02 +0200 |
---|---|---|
committer | Juan A. Suarez Romero <[email protected]> | 2019-07-26 15:10:50 +0000 |
commit | 2098b48fa0b2909d1e02e2da35aaa7885a87e766 (patch) | |
tree | a4224c911bf51e9486be7351847b016511745464 /src | |
parent | eb24e60cdc4f2669b69890aeb4f1f7c475b03593 (diff) |
nvc0/ir: Fix assert accessing null pointer
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111007
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111167
Signed-off-by: Mark Menzynski <[email protected]>
Reviewed-by: Ilia Mirkin <[email protected]>
Reviewed-by: Tobias Klausmann<[email protected]>
(cherry picked from commit 7493fbf032f5bcbf4c48187bc089c9a34f04a1d5)
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp index aca3b0afb1e..1f702a987d8 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp @@ -51,12 +51,12 @@ NVC0LegalizeSSA::handleDIV(Instruction *i) // Generate movs to the input regs for the call we want to generate for (int s = 0; i->srcExists(s); ++s) { Instruction *ld = i->getSrc(s)->getInsn(); - assert(ld->getSrc(0) != NULL); // check if we are moving an immediate, propagate it in that case if (!ld || ld->fixed || (ld->op != OP_LOAD && ld->op != OP_MOV) || !(ld->src(0).getFile() == FILE_IMMEDIATE)) bld.mkMovToReg(s, i->getSrc(s)); else { + assert(ld->getSrc(0) != NULL); bld.mkMovToReg(s, ld->getSrc(0)); // Clear the src, to make code elimination possible here before we // delete the instruction i later |