Mesa (main): aco/lower_phis: fix undef_operands initialization with >32 predecessors

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Jun 14 17:29:12 UTC 2021


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

Author: Rhys Perry <pendingchaos02 at gmail.com>
Date:   Thu Jun 10 11:23:56 2021 +0100

aco/lower_phis: fix undef_operands initialization with >32 predecessors

Signed-off-by: Rhys Perry <pendingchaos02 at gmail.com>
Reviewed-by: Daniel Schürmann <daniel at schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11300>

---

 src/amd/compiler/aco_lower_phis.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/amd/compiler/aco_lower_phis.cpp b/src/amd/compiler/aco_lower_phis.cpp
index 376ad85263a..313770fd29c 100644
--- a/src/amd/compiler/aco_lower_phis.cpp
+++ b/src/amd/compiler/aco_lower_phis.cpp
@@ -185,7 +185,7 @@ void lower_divergent_bool_phi(Program *program, ssa_state *state, Block *block,
 
    uint64_t undef_operands = 0;
    for (unsigned i = 0; i < phi->operands.size(); i++)
-      undef_operands |= phi->operands[i].isUndefined() << i;
+      undef_operands |= (uint64_t)phi->operands[i].isUndefined() << i;
 
    if (state->needs_init || undef_operands != state->cur_undef_operands ||
        block->logical_preds.size() > 64) {



More information about the mesa-commit mailing list