JVM_IR: defer some branch optimizations to codegen.

Specifically, defer the removal of hand-written "if (true|false)" from
JvmBuiltinOptimizationLowering into codegen so that appropriate debug
info (and a NOP) can be inserted.

Change-Id: Ia11af05ad8b4251946bd3e685fb7c3319f0f433f
This commit is contained in:
Ting-Yuan Huang
2019-03-01 11:30:27 -08:00
committed by max-kammerer
parent 6bbb0269b1
commit 013ad4b8e4
17 changed files with 272 additions and 20 deletions
@@ -4673,6 +4673,16 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
runTest("compiler/testData/codegen/box/controlStructures/forUserType.kt");
}
@TestMetadata("ifConst1.kt")
public void testIfConst1() throws Exception {
runTest("compiler/testData/codegen/box/controlStructures/ifConst1.kt");
}
@TestMetadata("ifConst2.kt")
public void testIfConst2() throws Exception {
runTest("compiler/testData/codegen/box/controlStructures/ifConst2.kt");
}
@TestMetadata("inRangeConditionsInWhen.kt")
public void testInRangeConditionsInWhen() throws Exception {
runTest("compiler/testData/codegen/box/controlStructures/inRangeConditionsInWhen.kt");