Support target templates in bytecode tests

Avoid test data duplication
This commit is contained in:
Mikhael Bogdanov
2019-07-16 09:15:31 +02:00
parent de1e27c584
commit 496765f41e
46 changed files with 250 additions and 679 deletions
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JVM_IR
fun test() {
var sum = 0
for (i in arrayOf("", "", "", "").indices) {
@@ -1,19 +0,0 @@
// TARGET_BACKEND: JVM_IR
fun test() {
var sum = 0
for (i in arrayOf("", "", "", "").indices) {
sum += i
}
}
// JVM non-IR uses while.
// JVM IR uses if + do-while.
// 0 iterator
// 0 getStart
// 0 getEnd
// 0 getFirst
// 0 getLast
// 1 IF_ICMPGT
// 1 IF_ICMPLE
// 2 IF
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JVM_IR
fun test() {
var sum = 0
for (i in intArrayOf(0, 0, 0, 0).indices) {
@@ -14,5 +13,12 @@ fun test() {
// 0 getEnd
// 0 getFirst
// 0 getLast
// JVM_TEMPLATES
// 1 IF_ICMPGE
// 1 IF
// 1 IF
// JVM_IR_TEMPLATES
// 1 IF_ICMPGT
// 1 IF_ICMPLE
// 2 IF
@@ -1,19 +0,0 @@
// TARGET_BACKEND: JVM_IR
fun test() {
var sum = 0
for (i in intArrayOf(0, 0, 0, 0).indices) {
sum += i
}
}
// JVM non-IR uses while.
// JVM IR uses if + do-while.
// 0 iterator
// 0 getStart
// 0 getEnd
// 0 getFirst
// 0 getLast
// 1 IF_ICMPGT
// 1 IF_ICMPLE
// 2 IF