Mesa (master): nir: Fix uninitialized use of 'replacement'.

Kenneth Graunke kwg at kemper.freedesktop.org
Wed Jul 20 00:35:10 UTC 2016


Module: Mesa
Branch: master
Commit: f0f466214e65aa462f80d3608296685011862714
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=f0f466214e65aa462f80d3608296685011862714

Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Mon Jul 18 22:42:44 2016 -0700

nir: Fix uninitialized use of 'replacement'.

For intrinsics we don't care about, just skip to the next loop iteration
and process the next instruction.  We don't want to execute the rest of
the code.

This was a bug in commit cdfc05ea6e8c87876cdbf588aa8e03d70f3da4bb.

Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
Reviewed-by: Anuj Phogat <anuj.phogat at gmail.com>

---

 src/compiler/nir/nir_lower_io.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/compiler/nir/nir_lower_io.c b/src/compiler/nir/nir_lower_io.c
index 71d2432..189370d 100644
--- a/src/compiler/nir/nir_lower_io.c
+++ b/src/compiler/nir/nir_lower_io.c
@@ -369,7 +369,7 @@ nir_lower_io_block(nir_block *block,
          break;
 
       default:
-         break;
+         continue;
       }
 
       if (nir_intrinsic_infos[intrin->intrinsic].has_dest) {




More information about the mesa-commit mailing list