<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_ASSIGNED "
   title="ASSIGNED - Adding a redundant single-iteration do-while loop causes different image to be rendered"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=110953#c2">Comment # 2</a>
              on <a class="bz_bug_link 
          bz_status_ASSIGNED "
   title="ASSIGNED - Adding a redundant single-iteration do-while loop causes different image to be rendered"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=110953">bug 110953</a>
              from <span class="vcard"><a class="email" href="mailto:idr@freedesktop.org" title="Ian Romanick <idr@freedesktop.org>"> <span class="fn">Ian Romanick</span></a>
</span></b>
        <pre>The difference in the output of "./glsl_compiler --version 300 --dump-lir" for
both shaders is below.  It looks like the loop in the second shader is
(incorrectly) unrolled twice.

--- /tmp/before.txt     2019-06-20 12:48:58.425392405 -0700
+++ /tmp/after.txt      2019-06-20 12:49:05.983437986 -0700
@@ -72,6 +72,14 @@
           )
           ())

+          (if (var_ref checkSwap_retval) (
+            (declare (temporary ) float assignment_tmp@2)
+            (assign  (x) (var_ref assignment_tmp@2)  (array_ref (var_ref data)
(var_ref i) ) ) 
+            (assign  (x) (array_ref (var_ref data) (var_ref i) )  (array_ref
(var_ref data) (var_ref j) ) ) 
+            (assign  (x) (array_ref (var_ref data) (var_ref j) )  (var_ref
assignment_tmp@2) ) 
+          )
+          ())
+
           (assign  (x) (var_ref j)  (expression int + (var_ref j) (constant
int (1)) ) ) 
         ))

@@ -87,12 +95,12 @@
         (assign  (xyzw) (var_ref _GLF_color)  (var_ref vec_ctor) ) 
       )
       (
-        (declare (temporary ) vec4 vec_ctor@2)
-        (assign  (w) (var_ref vec_ctor@2)  (constant float (1.000000)) ) 
-        (assign  (x) (var_ref vec_ctor@2)  (expression float / (array_ref
(var_ref data) (constant int (5)) ) (constant float (10.000000)) ) ) 
-        (assign  (y) (var_ref vec_ctor@2)  (expression float / (array_ref
(var_ref data) (constant int (9)) ) (constant float (10.000000)) ) ) 
-        (assign  (z) (var_ref vec_ctor@2)  (expression float / (array_ref
(var_ref data) (constant int (0)) ) (constant float (10.000000)) ) ) 
-        (assign  (xyzw) (var_ref _GLF_color)  (var_ref vec_ctor@2) ) 
+        (declare (temporary ) vec4 vec_ctor@3)
+        (assign  (w) (var_ref vec_ctor@3)  (constant float (1.000000)) ) 
+        (assign  (x) (var_ref vec_ctor@3)  (expression float / (array_ref
(var_ref data) (constant int (5)) ) (constant float (10.000000)) ) ) 
+        (assign  (y) (var_ref vec_ctor@3)  (expression float / (array_ref
(var_ref data) (constant int (9)) ) (constant float (10.000000)) ) ) 
+        (assign  (z) (var_ref vec_ctor@3)  (expression float / (array_ref
(var_ref data) (constant int (0)) ) (constant float (10.000000)) ) ) 
+        (assign  (xyzw) (var_ref _GLF_color)  (var_ref vec_ctor@3) ) 
       ))

     ))</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>