[aarch64-port-dev ] Assertion failures in mauve
Edward Nevill
edward.nevill at linaro.org
Fri Aug 9 02:10:50 PDT 2013
On Tue, 2013-08-06 at 11:21 +0100, Andrew Haley wrote:
> On 08/06/2013 11:03 AM, Edward Nevill wrote:
> >
> > # Internal Error (/home/ed/work/ssl/jdk8/hotspot/src/cpu/aarch64/vm/assembler_aarch64.cpp:1439), pid=16692, tid=139736898889472
> > # assert(sets_flags || uimm || Rd != Rn) failed: insn is a NOP
> >
> > The failing tests are
> >
> > java.awt.Label.PaintTest
[17 more failing tests deleted]
> That depends on why we're generating the NOP. Can you have a look,
> please?
All 18 test cases fail when trying to compile the same method
37808 1980 !b java.awt.FlowLayout::preferredLayoutSize (274 bytes)
Here is the relevant section of code from jdk/src/share/classes/java/awt/FlowLayout.java ([...] indicates irrelevant sections of code which have been elided).
public Dimension preferredLayoutSize(Container target) {
[...]
int maxAscent = 0;
int maxDescent = 0;
[...]
int baseline = m.getBaseline(d.width, d.height);
if (baseline >= 0) {
maxAscent = Math.max(maxAscent, baseline);
maxDescent = Math.max(maxDescent, d.height - baseline);
}
[...]
dim.height = Math.max(maxAscent + maxDescent, dim.height);
[...]
}
Now, m.getBaseline is inlined and either returns -1, or throws an exception. Therefore the code following is dead code eliminated. maxAscent and maxDescent are then constant propagated.
The following is the LIR generated.
+PrintIRWithLIR
192 1 i102 i24 + i24
move [int:0|I] [R156|I]
add [R156|I] [int:0|I] [R157|I]
which after register allocation becomes
+PrintLIR
222 move [int:0|I] [c_rarg0|I]
224 add [c_rarg0|I] [int:0|I] [c_rarg0|I]
which causes the assert failure above.
My own feeling is that we should fix this by silently suppressing the generation of the NOP in the back end. Trying to fix the in the LIR is going to lead to non trivial changes in shared code.
All the best,
Ed.
More information about the aarch64-port-dev
mailing list