FunctionLoweringInfo::StatepointRelocationMaps map is used to pass GC pointer lowering information from statepoint to gc.relocate which may appear in the different block. D124444 introduced different lowering for local and non-local relocates. Local relocates use statepoint SDValue and non-local relocates use value exported to VReg. But I overlooked the fact that StatepointRelocationMap is indexed not by GCRelocate instruction, but by derived pointer. This works incorrectly when we have two relocates (one local and another non-local) of the same value, because they need different relocation records. This patch fixes the problem by recording relocation information per relocate instruction, not per derived pointer. This way, each gc.relocate can be lowered differently.
Details
Details
Diff Detail
Diff Detail