summaryrefslogtreecommitdiff
path: root/src/amd/compiler/aco_builder_h.py
diff options
context:
space:
mode:
authorRhys Perry <pendingchaos02@gmail.com>2021-08-18 13:29:59 +0100
committerMarge Bot <eric+marge@anholt.net>2021-10-13 05:13:10 +0000
commit1988a784300f616ec182c2db6619f5280406d72b (patch)
tree9cd3247c29c5cbb262ad62369c7f975efcf0462b /src/amd/compiler/aco_builder_h.py
parent50c0451424a1bcf8e6a69780520a85ff684508b5 (diff)
downloadmesa-1988a784300f616ec182c2db6619f5280406d72b.tar.gz
aco: fix vadd32() when b is neither a constant nor temporary
This will be useful for compiling vertex shader prologs, where we basically use ACO as an assembler. Signed-off-by: Rhys Perry <pendingchaos02@gmail.com> Reviewed-by: Timur Kristóf <timur.kristof@gmail.com> Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11717>
Diffstat (limited to 'src/amd/compiler/aco_builder_h.py')
-rw-r--r--src/amd/compiler/aco_builder_h.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/amd/compiler/aco_builder_h.py b/src/amd/compiler/aco_builder_h.py
index 39b77fdc6c2..9ebf633eef0 100644
--- a/src/amd/compiler/aco_builder_h.py
+++ b/src/amd/compiler/aco_builder_h.py
@@ -432,7 +432,7 @@ public:
}
Result vadd32(Definition dst, Op a, Op b, bool carry_out=false, Op carry_in=Op(Operand(s2)), bool post_ra=false) {
- if (!b.op.isTemp() || b.op.regClass().type() != RegType::vgpr)
+ if (b.op.isConstant() || b.op.regClass().type() != RegType::vgpr)
std::swap(a, b);
if (!post_ra && (!b.op.hasRegClass() || b.op.regClass().type() == RegType::sgpr))
b = copy(def(v1), b);