Module: Mesa Branch: staging/21.0 Commit: 31ef7441cd5cdf918ba3c88a5ec53bd890a0b412 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=31ef7441cd5cdf918ba3c88a5ec53bd890a0b412
Author: Rhys Perry <pendingchao...@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 <pendingchao...@gmail.com> Reviewed-by: Daniel Schürmann <dan...@schuermann.dev> Fixes: 69b6069dd28 ("aco: refactor try_remove_trivial_phi() in RA") Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8645> (cherry picked from commit 824eba2148e56a75d0678011b4f546cabbd5d345) --- .pick_status.json | 2 +- src/amd/compiler/aco_register_allocation.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 245ee614382..3b228d3c263 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -202,7 +202,7 @@ "description": "aco: don't consider a phi trivial if same's register doesn't match the def", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "master_sha": null, "because_sha": "69b6069dd288455cdb2655284c592a85d17df273" }, diff --git a/src/amd/compiler/aco_register_allocation.cpp b/src/amd/compiler/aco_register_allocation.cpp index ee401583345..0b9c9f71494 100644 --- a/src/amd/compiler/aco_register_allocation.cpp +++ b/src/amd/compiler/aco_register_allocation.cpp @@ -1684,7 +1684,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; _______________________________________________ mesa-commit mailing list mesa-commit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-commit