ForLoopsLowering: Add additional bytecode text tests for optimization of

unsigned progressions.
This commit is contained in:
Mark Punzalan
2020-04-07 22:52:17 -07:00
committed by Alexander Udalov
parent 0e6af517d7
commit f249e7f5e9
22 changed files with 713 additions and 15 deletions
@@ -14,7 +14,7 @@ fun box(): String {
//
// // Standard form of loop over progression
// var inductionVar = 2
// val last = getProgressionLastElement(1, Int.MIN_VALUE - 1, 2) // `(Int.MIN_VALUE - 1)` underflows to 2147483647
// val last = getProgressionLastElement(2, Int.MIN_VALUE - 1, 2) // `(Int.MIN_VALUE - 1)` underflows to Int.MAX_VALUE
// val step = 2
// if (false && inductionVar <= last) { // `false` comes from constant folding of `Int.MIN_VALUE != Int.MIN_VALUE`
// // Loop is not empty