Mesa (master): aco: don't consider a phi trivial if same's register doesn't match the def
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Jan 22 12:57:21 UTC 2021
Module: Mesa
Branch: master
Commit: 824eba2148e56a75d0678011b4f546cabbd5d345
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=824eba2148e56a75d0678011b4f546cabbd5d345
Author: Rhys Perry <pendingchaos02 at gmail.com>
Date: Fri Jan 22 10:47:19 2021 +0000
aco: don't consider a phi trivial if same's register doesn't match the def
For example:
s2: %688:s[32-33] = p_linear_phi %3:s[10-11], %688:s[32-33]
would have been considered trivial.
This might happen due to parallelcopies when assigning phi registers.
Signed-off-by: Rhys Perry <pendingchaos02 at gmail.com>
Reviewed-by: Daniel Schürmann <daniel at schuermann.dev>
Fixes: 69b6069dd28 ("aco: refactor try_remove_trivial_phi() in RA")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8645>
---
src/amd/compiler/aco_register_allocation.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/amd/compiler/aco_register_allocation.cpp b/src/amd/compiler/aco_register_allocation.cpp
index 8b59317c51b..12d8cb354cf 100644
--- a/src/amd/compiler/aco_register_allocation.cpp
+++ b/src/amd/compiler/aco_register_allocation.cpp
@@ -1778,7 +1778,7 @@ void try_remove_trivial_phi(ra_ctx& ctx, Temp temp)
assert(t == same || op.physReg() == def.physReg());
continue;
}
- if (same != Temp())
+ if (same != Temp() || op.physReg() != def.physReg())
return;
same = t;
More information about the mesa-commit
mailing list