Prevent unnecessary changes to the IR in dead branch elim
authorAlan Baker <alanbaker@google.com>
Tue, 30 Jan 2018 20:00:27 +0000 (15:00 -0500)
committerDavid Neto <dneto@google.com>
Tue, 30 Jan 2018 21:51:58 +0000 (16:51 -0500)
commit16949236fe58d291cdc4c1197eae33401fabeb23
treee245863a0c0d70b6d0cd050104cdd6fedee2ee5f
parentc86cb76a226809554491a34534920508518d0deb
Prevent unnecessary changes to the IR in dead branch elim

* When handling unreachable merges and continues, do not optimize to the
same IR
 * pass did not check whether the unreachable blocks were in the
 optimized form before transforming them
* added a test to catch this issue
source/opt/dead_branch_elim_pass.cpp
test/opt/dead_branch_elim_test.cpp