Files
kotlin/compiler/testData/codegen/bytecodeText/forLoop/unsigned/forInUntilULongMinValue.kt
Mark Punzalan ccbf7cc2ee ForLoopsLowering: Use last-exclusive for-loops for optimized until
progressions instead of decrementing "last".

#KT-41352 Fixed
2020-10-09 21:34:56 +02:00

29 lines
427 B
Kotlin
Vendored

// WITH_RUNTIME
const val M = ULong.MIN_VALUE
fun f(a: ULong): Int {
var n = 0
for (i in a until M) {
n++
}
return n
}
// JVM non-IR uses while.
// JVM IR uses if + do-while.
// 0 iterator
// 0 getStart
// 0 getEnd
// 0 getFirst
// 0 getLast
// 0 getStep
// 0 INVOKESTATIC kotlin/ULong.constructor-impl
// 0 INVOKE\w+ kotlin/ULong.(un)?box-impl
// JVM_TEMPLATES
// 1 IF
// JVM_IR_TEMPLATES
// 2 IF