blob: 92132f187951415d92483e3bfdd45a190224e434 [file] [log] [blame]
// Copyright (c) 2024, the R8 project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
package com.android.tools.r8.ir.regalloc;
import com.android.tools.r8.TestBase;
import com.android.tools.r8.TestParameters;
import com.android.tools.r8.TestParametersCollection;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import org.junit.runners.Parameterized.Parameter;
import org.junit.runners.Parameterized.Parameters;
@RunWith(Parameterized.class)
public class ValueUsedInMultipleInvokeRangeInstructionsTest extends TestBase {
@Parameter(0)
public TestParameters parameters;
@Parameters(name = "{0}")
public static TestParametersCollection data() {
return getTestParameters().withDefaultDexRuntime().withMaximumApiLevel().build();
}
@Test
public void testD8() throws Exception {
testForD8()
.addInnerClasses(getClass())
.release()
.setMinApi(parameters)
.compile()
.runDex2Oat(parameters.getRuntime())
.assertNoVerificationErrors();
}
static class Main {
void test(long a) {
invoke(a, a, a);
invoke(a, a, a);
}
static void invoke(long a, long b, long c) {}
}
}