After last lworld+vector [merge 
](https://github.com/openjdk/valhalla/pull/1688) almost all vector API jtreg 
tests were failing with default options.

Summary of fixes:-
1/ The C2_MISMATCHED decorator forces memory accesses to use 
[TypeRawPtr::BOTTOM (alias index = 
Raw)](https://github.com/openjdk/valhalla/blob/lworld/src/hotspot/share/opto/inlinetypenode.cpp#L605),
which is a different memory slice than the typed alias used by subsequent 
LoadVector operations. 
When VectorBoxAllocateNode is expanded, the StoreVector for the payload writes 
to the Raw memory slice, but later LoadVector reads from the typed slice 
preventing value forwarding. 

2/ IR rule modification in following tests:-
test/hotspot/jtreg/compiler/vectorapi/VectorMaskCastIdentityTest.java
test/hotspot/jtreg/compiler/vectorapi/VectorMaskToLongTest.java
Modifications in above two tests is due to difference in mask boxing / unboxing 
handling introduced by a prior checkin:  
https://github.com/openjdk/valhalla/pull/845

With these two fixes all VectorAPI tests are now passing with following 
configurations at various AVX levels.
-       default options
-       With -XX:-UseNonAtomicValueFlattening 

Best Regards,
Jatin

-------------

Commit messages:
 - 8381610: [lworld+vector] Fix failing vectorAPI jtreg tests with default 
options

Changes: https://git.openjdk.org/valhalla/pull/2298/files
  Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=2298&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8381610
  Stats: 12 lines in 4 files changed: 7 ins; 0 del; 5 mod
  Patch: https://git.openjdk.org/valhalla/pull/2298.diff
  Fetch: git fetch https://git.openjdk.org/valhalla.git pull/2298/head:pull/2298

PR: https://git.openjdk.org/valhalla/pull/2298

Reply via email to