Skip to content

Commit 8332462

Browse files
eme64rwestrel
authored andcommitted
more tests, WIP
1 parent 57e9a39 commit 8332462

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

test/hotspot/jtreg/compiler/macronodes/TestInitializingStoreCapturing.java

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,35 @@
2626
* @bug 8327012
2727
* @summary Test that initializing store gets captured, i.e. moved before the InitializeNode
2828
* and made into a raw-store.
29-
*
29+
* @library /test/lib /
3030
* @run driver compiler.macronodes.TestInitializingStoreCapturing
3131
*/
3232

3333
package compiler.macronodes;
3434

35+
import compiler.lib.ir_framework.*;
36+
3537
public class TestInitializingStoreCapturing {
3638

39+
static class A {
40+
float value;
41+
A(float v) { value = v; }
42+
};
43+
3744
static public void main(String[] args) {
45+
TestFramework.run();
3846
}
3947

48+
@Test
49+
@IR(counts = {IRNode.STE, "= 0"})
50+
static A testInitializeField() {
51+
return new A(4.2f);
52+
}
53+
54+
@Test
55+
@IR(counts = {IRNode.STORE, "= 0"})
56+
static float[] testInitializeArray() {
57+
return new float[] {4.2f};
58+
}
4059
}
4160

0 commit comments

Comments
 (0)