nvc0: don't swap sources if either value is not in a GPR

The memory / immediate source should already be in the only valid
position.
This commit is contained in:
Christoph Bumiller
2011-02-16 11:42:28 +01:00
parent 2fa35eedd9
commit bb2c8e7099
@@ -245,6 +245,9 @@ check_swap_src_0_1(struct nv_instruction *nvi)
return;
assert(src0 && src1 && src0->value && src1->value);
if (src1->value->reg.file != NV_FILE_GPR)
return;
if (is_cspace_load(src0->value->insn)) {
if (!is_cspace_load(src1->value->insn)) {
nvi->src[0] = src1;