<html><head><base href="x-msg://5/"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Apr 7, 2011, at 6:48 AM, Jonas Paulsson wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Optima; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div class="hmmessage" style="font-size: 10pt; font-family: Tahoma; ">Hi,<br> <br>I have a MachineInstr that writes to a subreg, but clobbers the superreg.<br> <br>How should I BuildMI this instruction?<br> <br>I try to do a<span class="Apple-converted-space"> </span><br> <br>IMPLICIT_DEF super_reg<br>and then write to a subreg of that super register<br> <br>, but it gets DCE:ed.<br></div></span></blockquote><div><br></div><div>Right. IMPLICIT_DEF in machine code means the same as the LLVMIR 'undef' value. The IMPLICIT_DEF instructions become MachineOperand <undef> flags during ProcessImplicitDefs.</div><br><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Optima; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div class="hmmessage" style="font-size: 10pt; font-family: Tahoma; "> Is there a way to express this clobbering of a superregister?<br></div></span></blockquote><div><br></div><div>Is this before or after register allocation?</div><div><br></div><div>If you are talking about physical registers, you may not have to do anything.</div><div><br></div><div>If you mean virtual registers, add an <imp-def> MachineOperand for the super register.</div><div><br></div><div>/jakob</div><div><br></div></div></body></html>