Skip to content

Commit 8d3d1d4

Browse files
committed
8353058: [PPC64] Some IR framework tests are failing after JDK-8352595
Reviewed-by: mchevalier, thartmann
1 parent b01026a commit 8d3d1d4

File tree

1 file changed

+46
-37
lines changed

1 file changed

+46
-37
lines changed

test/hotspot/jtreg/testlibrary_tests/ir_framework/tests/TestPhaseIRMatching.java

Lines changed: 46 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -124,76 +124,87 @@ public void removeDuplicates() {
124124
i = 34;
125125
}
126126

127+
// Test failures on ideal phases only.
127128
@Test
128-
@IR(failOn = {IRNode.STORE, IRNode.FIELD_ACCESS, IRNode.COUNTED_LOOP},
129-
counts = {IRNode.STORE, "3", IRNode.FIELD_ACCESS, "2", IRNode.COUNTED_LOOP, "2"})
130-
@ExpectedFailure(ruleId = 1, phase = CompilePhase.PRINT_IDEAL, failOn = 1, counts = {1, 3})
131-
@ExpectedFailure(ruleId = 1, phase = CompilePhase.PRINT_OPTO_ASSEMBLY, failOn = 2)
129+
@IR(failOn = {IRNode.STORE, IRNode.OOPMAP_WITH, "asdf", IRNode.COUNTED_LOOP},
130+
counts = {IRNode.STORE, "2", IRNode.FIELD_ACCESS, "2", IRNode.STORE_I, "1"})
131+
@ExpectedFailure(ruleId = 1, phase = CompilePhase.PRINT_IDEAL, failOn = 1)
132132

133-
@IR(failOn = {IRNode.STORE, IRNode.FIELD_ACCESS, IRNode.COUNTED_LOOP})
134-
@ExpectedFailure(ruleId = 2, phase = CompilePhase.PRINT_IDEAL, failOn = 1)
135-
@ExpectedFailure(ruleId = 2, phase = CompilePhase.PRINT_OPTO_ASSEMBLY, failOn = 2)
133+
@IR(failOn = {IRNode.STORE_F, IRNode.OOPMAP_WITH, "asdf", IRNode.COUNTED_LOOP},
134+
counts = {IRNode.STORE, "2", IRNode.FIELD_ACCESS, "2", IRNode.STORE_I, "2"})
135+
@ExpectedFailure(ruleId = 2, phase = CompilePhase.PRINT_IDEAL, counts = 3)
136136

137-
@IR(counts = {IRNode.STORE, "3", IRNode.FIELD_ACCESS, "1", IRNode.COUNTED_LOOP, "2"})
138-
@ExpectedFailure(ruleId = 3, phase = CompilePhase.PRINT_IDEAL, counts = {1, 3})
139-
@ExpectedFailure(ruleId = 3, phase = CompilePhase.PRINT_OPTO_ASSEMBLY, counts = 2)
137+
@IR(failOn = {IRNode.STORE, IRNode.OOPMAP_WITH, "asdf", IRNode.COUNTED_LOOP})
138+
@ExpectedFailure(ruleId = 3, phase = CompilePhase.PRINT_IDEAL, failOn = 1)
139+
140+
@IR(counts = {IRNode.STORE, "3", IRNode.FIELD_ACCESS, "2", IRNode.COUNTED_LOOP, "2"})
141+
@ExpectedFailure(ruleId = 4, phase = CompilePhase.PRINT_IDEAL, counts = {1, 3})
142+
143+
@IR(failOn = {IRNode.STORE, IRNode.OOPMAP_WITH, "asdf", IRNode.COUNTED_LOOP},
144+
counts = {IRNode.STORE, "3", IRNode.FIELD_ACCESS, "2", IRNode.COUNTED_LOOP, "2"})
145+
@ExpectedFailure(ruleId = 5, phase = CompilePhase.PRINT_IDEAL, failOn = 1, counts = {1, 3})
140146

141147
@IR(counts = {IRNode.STORE_I, "2"})
142-
@ExpectedFailure(ruleId = 4, phase = CompilePhase.PRINT_IDEAL, counts = 1)
148+
@ExpectedFailure(ruleId = 6, phase = CompilePhase.PRINT_IDEAL, counts = 1)
143149
public void defaultOnIdeal() {
144150
i = 34;
145151
l = 34;
146152
}
147153

154+
// Test failures on mach phases only.
148155
@Test
149156
@IR(failOn = {IRNode.STORE_F, IRNode.FIELD_ACCESS, IRNode.COUNTED_LOOP},
150-
counts = {IRNode.STORE_F, "3", IRNode.FIELD_ACCESS, "1", IRNode.COUNTED_LOOP, "2"})
157+
counts = {IRNode.STORE_I, "1", IRNode.FIELD_ACCESS, "2", IRNode.OOPMAP_WITH, "asdf", "< 2"})
151158
@ExpectedFailure(ruleId = 1, phase = CompilePhase.PRINT_OPTO_ASSEMBLY, failOn = 2)
152-
@ExpectedFailure(ruleId = 1, phase = CompilePhase.PRINT_IDEAL, counts = {1, 3})
159+
160+
@IR(failOn = {IRNode.STORE_F, IRNode.OOPMAP_WITH, "asdf", IRNode.COUNTED_LOOP},
161+
counts = {IRNode.STORE_I, "1", IRNode.FIELD_ACCESS, "1", IRNode.OOPMAP_WITH, "asdf", "< 2"})
162+
@ExpectedFailure(ruleId = 2, phase = CompilePhase.PRINT_OPTO_ASSEMBLY, counts = 2)
153163

154164
@IR(failOn = {IRNode.STORE_F, IRNode.FIELD_ACCESS, IRNode.COUNTED_LOOP})
155-
@ExpectedFailure(ruleId = 2, phase = CompilePhase.PRINT_OPTO_ASSEMBLY, failOn = 2)
165+
@ExpectedFailure(ruleId = 3, phase = CompilePhase.PRINT_OPTO_ASSEMBLY, failOn = 2)
156166

157-
@IR(counts = {IRNode.STORE_F, "3", IRNode.FIELD_ACCESS, "1", IRNode.COUNTED_LOOP, "2"})
158-
@ExpectedFailure(ruleId = 3, phase = CompilePhase.PRINT_IDEAL, counts = {1, 3})
167+
@IR(counts = {IRNode.STORE_I, "1", IRNode.FIELD_ACCESS, "1", IRNode.OOPMAP_WITH, "asdf", "3"})
168+
@ExpectedFailure(ruleId = 4, phase = CompilePhase.PRINT_OPTO_ASSEMBLY, counts = {2, 3})
159169

160170
@IR(failOn = {IRNode.STORE_F, IRNode.FIELD_ACCESS, IRNode.COUNTED_LOOP},
161-
counts = {IRNode.STORE_F, "3", IRNode.FIELD_ACCESS, "2", IRNode.COUNTED_LOOP, "2"})
162-
163-
@ExpectedFailure(ruleId = 4, phase = CompilePhase.PRINT_OPTO_ASSEMBLY, failOn = 2, counts = 2)
164-
@ExpectedFailure(ruleId = 4, phase = CompilePhase.PRINT_IDEAL, counts = {1, 3})
171+
counts = {IRNode.STORE_I, "1", IRNode.FIELD_ACCESS, "1", IRNode.OOPMAP_WITH, "asdf", "3"})
172+
@ExpectedFailure(ruleId = 5, phase = CompilePhase.PRINT_OPTO_ASSEMBLY, failOn = 2, counts = {2, 3})
165173

166-
@IR(counts = {IRNode.FIELD_ACCESS, "2"})
167-
@ExpectedFailure(ruleId = 5, phase = CompilePhase.PRINT_OPTO_ASSEMBLY, counts = 1)
168-
public Object defaultOnOptoAssembly(Helper h) {
169-
return h.getString();
174+
@IR(counts = {IRNode.FIELD_ACCESS, "1"})
175+
@ExpectedFailure(ruleId = 6, phase = CompilePhase.PRINT_OPTO_ASSEMBLY, counts = 1)
176+
public void defaultOnOptoAssembly() {
177+
i = 34;
178+
l = 34;
170179
}
171180

181+
// Test failures on ideal and mach phases.
172182
@Test
173183
@IR(failOn = {IRNode.STORE, IRNode.FIELD_ACCESS, IRNode.COUNTED_LOOP},
174-
counts = {IRNode.STORE, "20", IRNode.FIELD_ACCESS, "3", IRNode.COUNTED_LOOP, "2"})
184+
counts = {IRNode.STORE, "2", IRNode.FIELD_ACCESS, "2", IRNode.STORE_I, "1"})
185+
@ExpectedFailure(ruleId = 1, phase = CompilePhase.PRINT_IDEAL, failOn = 1)
175186
@ExpectedFailure(ruleId = 1, phase = CompilePhase.PRINT_OPTO_ASSEMBLY, failOn = 2)
176-
@ExpectedFailure(ruleId = 1, phase = CompilePhase.PRINT_IDEAL, failOn = 1, counts = {1, 3})
177187

178188
@IR(failOn = {IRNode.STORE, IRNode.FIELD_ACCESS, IRNode.COUNTED_LOOP})
179189
@ExpectedFailure(ruleId = 2, phase = CompilePhase.PRINT_IDEAL, failOn = 1)
180190
@ExpectedFailure(ruleId = 2, phase = CompilePhase.PRINT_OPTO_ASSEMBLY, failOn = 2)
181191

182-
@IR(counts = {IRNode.STORE, "20", IRNode.FIELD_ACCESS, "2", IRNode.COUNTED_LOOP, "2"})
183-
@ExpectedFailure(ruleId = 3, phase = CompilePhase.PRINT_IDEAL, counts = {1, 3})
192+
@IR(counts = {IRNode.STORE, "20", IRNode.FIELD_ACCESS, "1", IRNode.STORE_I, "1"})
193+
@ExpectedFailure(ruleId = 3, phase = CompilePhase.PRINT_IDEAL, counts = 1)
184194
@ExpectedFailure(ruleId = 3, phase = CompilePhase.PRINT_OPTO_ASSEMBLY, counts = 2)
185195

186196
@IR(failOn = {IRNode.STORE, IRNode.FIELD_ACCESS, IRNode.COUNTED_LOOP},
187-
counts = {IRNode.STORE, "20", IRNode.FIELD_ACCESS, "2", IRNode.COUNTED_LOOP, "2"})
188-
@ExpectedFailure(ruleId = 4, phase = CompilePhase.PRINT_OPTO_ASSEMBLY, failOn = 2, counts = 2)
197+
counts = {IRNode.STORE, "20", IRNode.FIELD_ACCESS, "1", IRNode.COUNTED_LOOP, "2"})
189198
@ExpectedFailure(ruleId = 4, phase = CompilePhase.PRINT_IDEAL, failOn = 1, counts = {1, 3})
199+
@ExpectedFailure(ruleId = 4, phase = CompilePhase.PRINT_OPTO_ASSEMBLY, failOn = 2, counts = 2)
190200

191-
@IR(counts = {IRNode.FIELD_ACCESS, "2"})
192-
@ExpectedFailure(ruleId = 5, phase = CompilePhase.PRINT_OPTO_ASSEMBLY, counts = 1)
193-
public Object defaultOnBoth(Helper h) {
201+
@IR(failOn = {IRNode.STORE, IRNode.FIELD_ACCESS, IRNode.COUNTED_LOOP, IRNode.STORE_I},
202+
counts = {IRNode.STORE, "20", IRNode.FIELD_ACCESS, "1", IRNode.COUNTED_LOOP, "2", IRNode.OOPMAP_WITH, "asdf", "2"})
203+
@ExpectedFailure(ruleId = 5, phase = CompilePhase.PRINT_IDEAL, failOn = {1, 4}, counts = {1, 3})
204+
@ExpectedFailure(ruleId = 5, phase = CompilePhase.PRINT_OPTO_ASSEMBLY, failOn = 2, counts = {2, 4})
205+
public void defaultOnBoth() {
194206
i = 34;
195207
l = 34;
196-
return h.getString();
197208
}
198209

199210
@Test
@@ -215,7 +226,7 @@ public int removeLoopsWithMultipleCompilations(int k) {
215226
return x;
216227
}
217228

218-
@Run(test = {"removeLoopsWithMultipleCompilations", "defaultOnOptoAssembly", "defaultOnBoth"})
229+
@Run(test = "removeLoopsWithMultipleCompilations")
219230
@Warmup(1)
220231
public void run() {
221232
for (int i = 0; i < 10000; i++) {
@@ -224,8 +235,6 @@ public void run() {
224235
for (int i = 0; i < 10000; i++) {
225236
removeLoopsWithMultipleCompilations(3);
226237
}
227-
defaultOnOptoAssembly(new Helper("a", 1));
228-
defaultOnBoth(new Helper("a", 1));
229238
}
230239

231240
@Test

0 commit comments

Comments
 (0)