Files
kotlin/compiler/testData/codegen/bytecodeText/intrinsicsCompare/byteSmartCast.kt
Dmitry Petrov 1378b0cf05 Fix bytecode tests after new optimizations
- Turn some const conditions into non-const conditions
- Make sure inlined const values are used where required
(otherwise they are eliminated by POP backward propagation)
2017-05-16 17:28:43 +03:00

18 lines
539 B
Kotlin
Vendored

fun equals3(a: Byte?, b: Byte?) = a != null && b != null && a == b
fun equals4(a: Byte?, b: Byte?) = if (a is Byte && b is Byte) a == b else null!!
fun equals5(a: Any?, b: Any?) = if (a is Byte && b is Byte) a == b else null!!
fun less3(a: Byte?, b: Byte?) = a != null && b != null && a < b
fun less4(a: Byte?, b: Byte?) = if (a is Byte && b is Byte) a < b else true
fun less5(a: Any?, b: Any?) = if (a is Byte && b is Byte) a < b else true
// 3 Intrinsics\.areEqual
// 3 Intrinsics\.compare
// for compare:
// 3 IFGE
// 0 IF_ICMPGE