Push DecodeN node below the test to the non-null path to use
decode_heap_oop_not_null mach node which does not have 0 test.
Keep CastPP node for such cases and replace CastPP(DecodeN) with DecodeN
clone node with NotNull type during final_graph_reshape phase.
This will also allow to generate more implicit null checks with compressed
On x86_64 the resulting code will be:
movl RDX, [R12 + R10 << 3 + #12] (compressed oop addressing) # range
And on sparc (requires to pin DecodeN to the non-null path):
decode_heap_oop_not_null R_L7, R_O1
LDUW [R_O1 + #12],R_L2 ! range
Also don't compare memory address types in Matcher when DecodeN is
consumed by an address expression since types will be different
at least by nullness.