> Hello,
> 
> Right now we check the null-marker for the NULLABLE_ATOMIC_FLAT LayoutKind 
> twice, both before and after allocating a heap instance. The first check 
> returns nullptr early if the null-marker is set, as we don't have to allocate 
> an object on the heap if we are going to return nullptr anyways. The other 
> check is redundant, since if the null-marker is not set, the source object is 
> non-null, which means the destination (res) object is non-null as well after 
> copying, so the code inside it is unreachable.
> 
> Testing:
> * Oracle's tier1-4, hotspot_valhalla, jdk_valhalla
> * I also added a `gurantee` for the removed code and ran through 
> hotspot_valhalla and jdk_valhalla locally.

Joel Sikström has updated the pull request incrementally with one additional 
commit since the last revision:

  Add comment

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

Changes:
  - all: https://git.openjdk.org/valhalla/pull/1914/files
  - new: https://git.openjdk.org/valhalla/pull/1914/files/705b1416..c4776d84

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=valhalla&pr=1914&range=01
 - incr: https://webrevs.openjdk.org/?repo=valhalla&pr=1914&range=00-01

  Stats: 12 lines in 1 file changed: 12 ins; 0 del; 0 mod
  Patch: https://git.openjdk.org/valhalla/pull/1914.diff
  Fetch: git fetch https://git.openjdk.org/valhalla.git pull/1914/head:pull/1914

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

Reply via email to