i965/cfg: Fix end_ip of last basic block.
authorMatt Turner <mattst88@gmail.com>
Mon, 5 Jan 2015 02:04:13 +0000 (18:04 -0800)
committerMatt Turner <mattst88@gmail.com>
Thu, 8 Jan 2015 23:38:16 +0000 (15:38 -0800)
start_ip and end_ip are inclusive.

Increases instruction counts in 64 shaders in shader-db, likely
indicative of them previously being misoptimized.

src/mesa/drivers/dri/i965/brw_cfg.cpp

index 02149e2e3b192667a99a971c366e067e59d404cc..62cc23970d6fb6fbc547c75b3cc2ef71b700481c 100644 (file)
@@ -313,7 +313,7 @@ cfg_t::cfg_t(exec_list *instructions)
       }
    }
 
-   cur->end_ip = ip;
+   cur->end_ip = ip - 1;
 
    make_block_array();
 }