<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Piglit shaders@ssa@fs-if-def-else-break fails with sb but passes with R600_DEBUG=nosb"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=101442">101442</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Piglit shaders@ssa@fs-if-def-else-break fails with sb but passes with R600_DEBUG=nosb
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Mesa
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>git
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Drivers/Gallium/r600
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>dri-devel@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>gw.fossdev@gmail.com
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>dri-devel@lists.freedesktop.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>The  piglit test 

  shaders@ssa@fs-if-def-else-break

fails with only with sb enabled but passes without it.

The relevant parts of the failing shader before and after optimization look
like this: 

===== SHADER #12 ====================================== PS/BARTS/EVERGREEN
=====
===== 90 dw ===== 9 gprs ===== 2 stack ==================================
[...]
0060  801f00fe 0100229c     6 MP   x: PRED_SETNE_INT     R8.x,  PV.x, 0
0018  0000000b 82800000 JUMP @22
0020  0000001f a00c0000 ALU 4 @62
 0062  000000f8 00200c90     7      x: MOV                R1.x,  0      <----
 0064  000004f9 20200c90            y: MOV                R1.y,  1.0    <----
 0066  000000f8 40200c90            z: MOV                R1.z,  0
 0068  800004f9 60200c90            w: MOV                R1.w,  1.0
0022  0000000d 83400001 ELSE @26 POP:1
0024  00000023 a80c0000 ALU_POP_AFTER 4 @70
 0070  000004f9 00200c90     8      x: MOV                R1.x,  1.0    <----
 0072  000000f8 20200c90            y: MOV                R1.y,  0      <----
 0074  000000f8 40200c90            z: MOV                R1.z,  0
 0076  800004f9 60200c90            w: MOV                R1.w,  1.0
0026  40000027 a4040000 ALU_PUSH_BEFORE 2 @78 KC0[CB0:0-15]
 0078  80000081 00801990     9      x: NOT_INT            R4.x,  KC0[1].x

 0080  801f00fe 0100229c    10 MP   x: PRED_SETNE_INT     R8.x,  PV.x, 0
0028  00000011 82800001 JUMP @34 POP:1
0030  00000011 82400000 LOOP_BREAK @34
0032  00000011 83800001 POP @34 POP:1
0034  00000002 81400000 LOOP_END @4
0036  00000029 a00c0000 ALU 4 @82
 0082  00000001 00000c90    11      x: MOV                R0.x,  R1.x
 0084  00000401 20000c90            y: MOV                R0.y,  R1.y
 0086  00000801 40000c90            z: MOV                R0.z,  R1.z
 0088  80000c01 60000c90            w: MOV                R0.w,  R1.w
0038  c0000000 95200688 EXPORT_DONE        PIXEL 0     R0.xyzw  EOP
===== SHADER_END
===============================================================



===== SHADER #12 OPT ================================== PS/BARTS/EVERGREEN
=====
===== 50 dw ===== 1 gprs ===== 2 stack
=========================================
[...]

 0040  801f0800 00002284     3 M    x: PRED_SETNE_INT     __.x,  R0.z, 0
0018  0000000d 82800001 JUMP @26 POP:1
0020  00000015 a0040000 ALU 2 @42
 0042  000000f9 00000c90     4      x: MOV                R0.x,  1.0   <-----
 0044  800000f8 20000c90            y: MOV                R0.y,  0     <-----
0022  0000000e 82400000 LOOP_BREAK @28
0024  0000000d 83800001 POP @26 POP:1
0026  00000017 a0040000 ALU 2 @46
 0046  000000f9 00000c90     5      x: MOV                R0.x,  1.0   <-----
 0048  800000f8 20000c90            y: MOV                R0.y,  0     <-----
0028  00000002 81400000 LOOP_END @4
0030  c0000000 95200a44 EXPORT_DONE        PIXEL 0     R0.0xy1  EOP
===== SHADER_END
===============================================================

In short after the optimization R0.xy get the same values assigned in both
decision paths. 

Best, 
Gert</pre>
        </div>
      </p>


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

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