summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorChristoph Bumiller <[email protected]>2013-02-28 23:41:41 +0100
committerChristoph Bumiller <[email protected]>2013-03-12 12:55:33 +0100
commitd995f44f0bba2ec5edcede66c31f63753f178a75 (patch)
treeddc8da284871be6ed3e312e7d337625b0e789de3 /src/gallium/drivers
parent95ad9bca2fd4c3d0c9d7b0b55e6cca034bec0377 (diff)
nv50/ir/ra: swap copyCompound args if src is compound and dst isn't
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/nv50/codegen/nv50_ir_ra.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gallium/drivers/nv50/codegen/nv50_ir_ra.cpp b/src/gallium/drivers/nv50/codegen/nv50_ir_ra.cpp
index dbf43d43039..b6209bd162e 100644
--- a/src/gallium/drivers/nv50/codegen/nv50_ir_ra.cpp
+++ b/src/gallium/drivers/nv50/codegen/nv50_ir_ra.cpp
@@ -857,11 +857,20 @@ static inline uint8_t makeCompMask(int compSize, int base, int size)
}
}
+// Used when coalescing moves. The non-compound value will become one, e.g.:
+// mov b32 $r0 $r2 / merge b64 $r0d { $r0 $r1 }
+// split b64 { $r0 $r1 } $r0d / mov b64 $r0d f64 $r2d
static inline void copyCompound(Value *dst, Value *src)
{
LValue *ldst = dst->asLValue();
LValue *lsrc = src->asLValue();
+ if (ldst->compound && !lsrc->compound) {
+ LValue *swap = lsrc;
+ lsrc = ldst;
+ ldst = swap;
+ }
+
ldst->compound = lsrc->compound;
ldst->compMask = lsrc->compMask;
}