Copy propagation today can substitute uses with live defs of locals. In doing so, it compares the value number of the def to the value of the use as a LCL_VAR. This is not correct because of zero-offset field sequences. Consider:
var a1 = addr; // Zero [FldSeq]
var a2 = addr; // No FldSeq
use LCL_VAR a2 Zero [FldSeq] // Attached to the node itself
If we replace the use with a1, then on renumbering (under JitOptRepeat) we will have a duplicated sequence.
Copy propagation today can substitute uses with live defs of locals. In doing so, it compares the value number of the def to the value of the use as a
LCL_VAR. This is not correct because of zero-offset field sequences. Consider:If we replace the
usewitha1, then on renumbering (underJitOptRepeat) we will have a duplicated sequence.