RFR: 8206144: [lworld] Adapt and add C2 intrinsics for value types Unsafe API

Tobias Hartmann tobias.hartmann at oracle.com
Mon Jan 21 15:38:10 UTC 2019

Hi Roland,

this looks good to me but please add some whitespaces to type.cpp:2513 and a newline to
library_call.cpp:2711 before pushing ;)

And yes, cherry picking 8216549 is fine.


On 21.01.19 14:32, Roland Westrelin wrote:
> Hi Tobias,
> Thanks for looking at this.
>> I've quickly submitted some testing for this before going on vacation (haven't reviewed it yet) and
>> now had a look at the results. Many tests fail with:
>> #  assert(bt == alias_type->basic_type() || bt == T_VALUETYPE) failed: should match
> Updated webrev should fix it:
> http://cr.openjdk.java.net/~roland/8206144/webrev.01/
> I also tweaked the code. The first patch wouldn't set the mark work to
> larval state. The new one does. But that caused new issues: escape
> analysis doesn't like the loads/stores to the mark work because it's at
> offset 0 and there's no AddP. I also had to tweak the code so the
> allocation of a non escaping larval buffer can be eliminated.
>> Caused by: java.lang.RuntimeException: assertEquals: expected 0 to equal 768
>> 	at jdk.test.lib.Asserts.fail(Asserts.java:594)
>> 	at jdk.test.lib.Asserts.assertEquals(Asserts.java:205)
>> 	at jdk.test.lib.Asserts.assertEquals(Asserts.java:189)
>> 	at jdk.test.lib.Asserts.assertEQ(Asserts.java:166)
>> 	at compiler.valhalla.valuetypes.TestIntrinsics.test29_verifier(TestIntrinsics.java:508)
>> 	... 6 more
> That one is an upstream bug: 8216549: "Mismatched unsafe access to non
> escaping object fails". I propose we cherry pick it.
> Roland.

More information about the valhalla-dev mailing list