Make redundant null check optimization independent of boxing optimization algorithm.

Run DCE after each single redundant null check optimization pass.
This commit is contained in:
Dmitry Petrov
2017-02-06 20:01:54 +03:00
parent eda43c8b45
commit 3fc106572e
20 changed files with 454 additions and 141 deletions

View File

@@ -0,0 +1,18 @@
// WITH_RUNTIME
fun test1() {
val a = Unit
if (a != null) {
println("X1")
}
if (a == null) {
println("X2")
}
}
// 0 IFNULL
// 0 IFNONNULL
// 1 X1
// 0 X2