i965/fs: Preserve CFG in predicated break pass.
authorMatt Turner <mattst88@gmail.com>
Thu, 17 Jul 2014 17:50:31 +0000 (10:50 -0700)
committerMatt Turner <mattst88@gmail.com>
Fri, 22 Aug 2014 17:23:34 +0000 (10:23 -0700)
commitb8aa1005c82ff732f714cd0dcca39775aa368dd7
treea9cce4b68b7eba7cdbc5bf6f74309dc441561e9a
parent3c4c2a6e300fccbbec89f149e05ff086d6774319
i965/fs: Preserve CFG in predicated break pass.

Operating on this code,

B0: ...
    cmp.ne.f0(8)
    (+f0) if(8)
B1: break(8)
B2: endif(8)

We can delete B2 without attempting to merge any blocks, since the
break/continue instruction necessarily ends the previous block.

After deleting the if instruction, we attempt to merge blocks B0 and B1.

Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
src/mesa/drivers/dri/i965/brw_fs_peephole_predicated_break.cpp