mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 02:10:11 +01:00
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 <mmenzyns@redhat.com> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Tobias Klausmann<tobias.klausmann@freenet.de>
This commit is contained in:
parent
d36af71f44
commit
7493fbf032
1 changed files with 1 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue