<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Dividing zero by a uniform in loop header causes segfault in nv50_ir::NVC0LegalizeSSA::handleDIV"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=111167#c1">Comment # 1</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Dividing zero by a uniform in loop header causes segfault in nv50_ir::NVC0LegalizeSSA::handleDIV"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=111167">bug 111167</a>
              from <span class="vcard"><a class="email" href="mailto:imirkin@alum.mit.edu" title="Ilia Mirkin <imirkin@alum.mit.edu>"> <span class="fn">Ilia Mirkin</span></a>
</span></b>
        <pre>Right...

      Instruction *ld = i->getSrc(s)->getInsn();
      assert(ld->getSrc(0) != NULL);

We must end up propagating the zero imm directly into DIV's args. This is
generally legal even for ops that don't allow imms because of the RZ thing.
However in this case ... it screws things up, since we have to move the value
to a fixed reg.

It looks like the assert() is just misplaced there. It should go into the
"else" clause below and all will be well... we handle the "!ld" / "ld is not a
load/mov" cases already just fine.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the QA Contact for the bug.</li>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>