nv50: check dst compatibility in CSE
authorChristoph Bumiller <e0425955@student.tuwien.ac.at>
Tue, 17 Aug 2010 13:27:56 +0000 (15:27 +0200)
committerChristoph Bumiller <e0425955@student.tuwien.ac.at>
Tue, 17 Aug 2010 13:30:35 +0000 (15:30 +0200)
src/gallium/drivers/nv50/nv50_pc_optimize.c

index 3e6e09a904f4c8ddc28575fd1174a59d54070b0a..80f3bb34b057cd91623bcc2ebc35266b4cb6ca87 100644 (file)
@@ -1007,6 +1007,13 @@ nv_pass_cse(struct nv_pass *ctx, struct nv_basic_block *b)
                 ik->flags_def || ir->flags_def)
                continue; /* and also not with flags, for now */
 
+            assert(ik->def[0] && ir->def[0]);
+
+            if (ik->def[0]->reg.file == NV_FILE_OUT ||
+                ir->def[0]->reg.file == NV_FILE_OUT ||
+                !values_equal(ik->def[0], ir->def[0]))
+               continue;
+
             for (s = 0; s < 3; ++s) {
                struct nv_value *a, *b;