nv50/ir: 64-bit splitting fixes
authorIlia Mirkin <imirkin@alum.mit.edu>
Tue, 19 Jan 2016 10:37:24 +0000 (05:37 -0500)
committerIlia Mirkin <imirkin@alum.mit.edu>
Thu, 21 Jan 2016 00:37:34 +0000 (19:37 -0500)
Take reading shader outputs into account, and use setFlagsDef for the
carry since we rely on having i->flagsDef being set.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
src/gallium/drivers/nouveau/codegen/nv50_ir_build_util.cpp

index 1bf7240e1313c9dd084768ff06b7cb1af59eba35..f58cf97646ebca956950302096e36a5b45aaf733 100644 (file)
@@ -615,6 +615,7 @@ BuildUtil::split64BitOpPostRA(Function *fn, Instruction *i,
          case FILE_MEMORY_CONST:
          case FILE_MEMORY_SHARED:
          case FILE_SHADER_INPUT:
+         case FILE_SHADER_OUTPUT:
             hi->getSrc(s)->reg.data.offset += 4;
             break;
          default:
@@ -625,7 +626,7 @@ BuildUtil::split64BitOpPostRA(Function *fn, Instruction *i,
       }
    }
    if (srcNr == 2) {
-      lo->setDef(1, carry);
+      lo->setFlagsDef(1, carry);
       hi->setFlagsSrc(hi->srcCount(), carry);
    }
    return hi;