Fixes #1338. Handle OpConstantNull in branch/switch conditions
authorAlan Baker <alanbaker@google.com>
Wed, 21 Feb 2018 13:51:21 +0000 (08:51 -0500)
committerAlan Baker <alanbaker@google.com>
Wed, 21 Feb 2018 15:22:39 +0000 (10:22 -0500)
commit01760d2f0f6422b330ea99dd67da72230ef2bbd7
tree521950dd574e62199758af95c01f5d1df9e1af59
parent51ecc7318f7aea8472cf49be768eac7f3236eeaa
Fixes #1338. Handle OpConstantNull in branch/switch conditions

* No longer assume the branch/switch condition must be bool or int
constants (respectively)
* Added a couple unit tests for each case
source/opt/ccp_pass.cpp
test/opt/ccp_test.cpp