Added 3 tests proving that new ternary improvement only affects real booleans

This commit is contained in:
Tal Ater 2015-01-13 18:46:19 +02:00
parent 63b05c2bc3
commit 1ba6594f62

View File

@ -343,6 +343,14 @@ cond_8: {
} else {
a = true;
}
// don't compress these
a = condition ? 1 : false;
a = !condition ? true : 0;
a = condition ? 1 : 0;
}
expect: {
a = !!condition;
@ -353,5 +361,8 @@ cond_8: {
a = !!condition;
a = !condition();
a = !condition;
a = condition ? 1 : false;
a = condition ? 0 : true;
a = condition ? 1 : 0;
}
}