Mesa (master): nir/opt_dead_cf: correction of side effect check
Jason Ekstrand
jekstrand at kemper.freedesktop.org
Sat Apr 30 19:17:18 UTC 2016
Module: Mesa
Branch: master
Commit: 69357261972ede8ef4c6ed315a416b94c9300724
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=69357261972ede8ef4c6ed315a416b94c9300724
Author: Thomas Hindoe Paaboel Andersen <phomes at gmail.com>
Date: Fri Apr 29 20:31:58 2016 +0200
nir/opt_dead_cf: correction of side effect check
Parenthesis are needed here as ! takes precedence over the &. The
check had the opposite effect than intended.
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
---
src/compiler/nir/nir_opt_dead_cf.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/compiler/nir/nir_opt_dead_cf.c b/src/compiler/nir/nir_opt_dead_cf.c
index 2e04c17..7450b1c 100644
--- a/src/compiler/nir/nir_opt_dead_cf.c
+++ b/src/compiler/nir/nir_opt_dead_cf.c
@@ -155,8 +155,8 @@ cf_node_has_side_effects(nir_cf_node *node)
continue;
nir_intrinsic_instr *intrin = nir_instr_as_intrinsic(instr);
- if (!nir_intrinsic_infos[intrin->intrinsic].flags &
- NIR_INTRINSIC_CAN_ELIMINATE)
+ if (!(nir_intrinsic_infos[intrin->intrinsic].flags &
+ NIR_INTRINSIC_CAN_ELIMINATE))
return true;
}
}
More information about the mesa-commit
mailing list