From: bugzilla-daemon@freedesktop.org Subject: [Bug 101442] Piglit shaders@ssa@fs-if-def-else-break fails with sb but passes with R600_DEBUG=nosb Date: Sat, 27 Jan 2018 21:00:57 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1534267393==" Return-path: Received: from culpepper.freedesktop.org (culpepper.freedesktop.org [131.252.210.165]) by gabe.freedesktop.org (Postfix) with ESMTP id 7484C89A8C for ; Sat, 27 Jan 2018 21:00:57 +0000 (UTC) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============1534267393== Content-Type: multipart/alternative; boundary="15170868570.06Edc.3535" Content-Transfer-Encoding: 7bit --15170868570.06Edc.3535 Date: Sat, 27 Jan 2018 21:00:57 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.freedesktop.org/ Auto-Submitted: auto-generated https://bugs.freedesktop.org/show_bug.cgi?id=3D101442 --- Comment #5 from Gert Wollny --- With a bit more digging I found out that the sb optimizer simply drops the = ELSE if no ALU instructions are found in the else branch, i.e.=20 while(cond1) if (cond2) { a =3D b + c;=20 } else { break;=20 } } becomes=20 while(cond1) if (cond2) { a =3D b + c;=20 break;=20 } } after the first sb/dce_cleanup pass, and this is obviously wrong. With the break in the if path this is not a problem. I'll attach two piglits that illustrate the behaviour. --=20 You are receiving this mail because: You are the assignee for the bug.= --15170868570.06Edc.3535 Date: Sat, 27 Jan 2018 21:00:57 +0000 MIME-Version: 1.0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.freedesktop.org/ Auto-Submitted: auto-generated

Commen= t # 5 on bug 10144= 2 from Gert Wollny
With a bit more digging I found out that the sb optimizer simp=
ly drops the ELSE
if no ALU instructions are found in the else branch, i.e.=20

   while(cond1)
      if (cond2) {
          a =3D b + c;=20
      } else {
          break;=20
      }
   }

becomes=20

   while(cond1)
      if (cond2) {
         a =3D b + c;=20
         break;=20
   }
}

after the first sb/dce_cleanup pass, and this is obviously wrong. With the
break in the if path this is not a problem. I'll attach two piglits that
illustrate the behaviour.


You are receiving this mail because:
  • You are the assignee for the bug.
= --15170868570.06Edc.3535-- --===============1534267393== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVsCg== --===============1534267393==--