<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from rtf -->
<style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<font face="Arial, sans-serif" size="2">
<div>Hi,</div>
<div> </div>
<div>I have the following code:</div>
<div> </div>
<div>  %a1<def> = COPY %a0<kill></div>
<div>  ...</div>
<div>  %a0h<def> = COPY %a1l</div>
<div> </div>
<div>, as input to MachineCopyPropagation.</div>
<div> </div>
<div>The second copy is illegally erased! This is wrong, because it is the low part of a1 that is copied to the high part of a0.</div>
<div> </div>
<div>At a first glance, it seems that </div>
<div> </div>
<div> if (!ReservedRegs.test(Def) &&</div>
<div>     (!ReservedRegs.test(Src) || NoInterveningSideEffect(CopyMI, MI)) &&</div>
<div>       (SrcSrc == Def || TRI->isSubRegister(SrcSrc, Def))) {</div>
<div>        ... </div>
<div>        (erase COPY)</div>
<div> </div>
<div>, should be extended to </div>
<div> </div>
<div>...</div>
<div>      (SrcSrc == Def || (TRI->isSubRegister(SrcSrc, Def) && isMatchingSubRegIdx(%a0, %a0h, %a1, %a1l)))) {</div>
<div> </div>
<div>, where isMatchingSubRegIdx (or whatever) should make sure that this type of subreg motion is not missed.</div>
<div> </div>
<div>Or is there something else that I've missed, that would avoid the problem?</div>
<div> </div>
<div>/Jonas</div>
<div> </div>
<div> </div>
</font>
</body>
</html>