<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [G965 ILK G45] Regression: 24 piglit regressions in glsl-1.10"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=92621#c4">Comment # 4</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [G965 ILK G45] Regression: 24 piglit regressions in glsl-1.10"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=92621">bug 92621</a>
              from <span class="vcard"><a class="email" href="mailto:apinheiro@igalia.com" title="Alejandro Piñeiro (freenode IRC: apinheiro) <apinheiro@igalia.com>"> <span class="fn">Alejandro Piñeiro (freenode IRC: apinheiro)</span></a>
</span></b>
        <pre>Ok, I found the problem. Some comparisons are being wrongly removed with
unpack_flags.

When I added this function:

   bool reads_flag(unsigned c)
   {
      if (!reads_flag())
         return false;

      switch (predicate) {
      case BRW_PREDICATE_NONE:
         return false;
      case BRW_PREDICATE_ALIGN16_REPLICATE_X:
         return c == 0;
      case BRW_PREDICATE_ALIGN16_REPLICATE_Y:
         return c == 1;
      case BRW_PREDICATE_ALIGN16_REPLICATE_Z:
         return c == 2;
      case BRW_PREDICATE_ALIGN16_REPLICATE_W:
         return c == 3;
      default:
         return true;
      }
   }

I was only checking the predicate, but as the one without parameter shows:
   bool reads_flag()
   {
      return predicate || opcode == VS_OPCODE_UNPACK_FLAGS_SIMD4X2;
   }

We also need to check the opcode. 

Adding that checks fixes the regressions I tested manually. I will do a full
test and send a patch to the list soon.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the QA Contact for the bug.</li>
      </ul>
    </body>
</html>