<div dir="ltr"><div class="gmail_extra">Yes, that will hold for the reg copy. But what about copying an immediate? Or subdividing one wide reg into two standard to run some math?</div><div class="gmail_extra">Also, what'd be the best approach - using RegisterTuple like in AMDGPU, or using RegisterClass?</div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Mar 22, 2017 at 9:11 PM, Arsenault, Matthew <span dir="ltr"><<a href="mailto:Matthew.Arsenault@amd.com" target="_blank">Matthew.Arsenault@amd.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<div id="m_-1292206382351359339m_3056353952140647094divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif" dir="ltr">
<p>I think you really just want to be emitting a COPY and handling the wide registers in copyPhysReg for bitconvert</p>
</div>
<hr style="display:inline-block;width:98%">
<div id="m_-1292206382351359339m_3056353952140647094divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Peter Bel <<a href="mailto:upcfrost@gmail.com" target="_blank">upcfrost@gmail.com</a>><br>
<b>Sent:</b> Wednesday, March 22, 2017 10:18:45 AM<br>
<b>To:</b> Arsenault, Matthew<br>
<b>Subject:</b> Re: [llvm-dev] REG_SEQUENCE use question</font>
<div> </div>
</div><div><div class="m_-1292206382351359339h5">
<div>
<div dir="ltr">
<div>Thanks for mentioning bitconvert, I completely forgot about it, and I think there's a couple of places where I'll need it to be implemented.</div>
About the REG_SEQUENCE - in fact the only 2 things that i want to be able to do are to use 64-bit load/store instructions (which use RegisterTuples similar to AMDGPU), and to handle 64-bit values (i.e. setting and saving them).
<div>The CPU itself can't handle any 64-bit ops except load/store, but as far as i understood, having some kind of i64/f64 virtual reg class or tuple (probably tuple would be better here) is necessary to use 64-bit types like double.</div>
<div><br>
</div>
<div>That said, I'm just not sure how to proceed with this stuff - should it be regclass or regtuple, should i write additional patterns to handle all other ops, etc.</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Wed, Mar 22, 2017 at 7:32 PM, Matt Arsenault <span dir="ltr">
<<a href="mailto:Matthew.Arsenault@amd.com" target="_blank">Matthew.Arsenault@amd.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span>On 03/22/2017 08:17 AM, Peter Bel via llvm-dev wrote:<br>
</span>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span>Hi all,<br>
<br>
Can someone please explain me how to use REG_SEQUENCE in tablegen?<br>
The arch i'm writing backend for has 32-bit regs, and it has a couple of 64-bit load/store instructions which use two neighboring regs at once, which i'm trying to employ using virtual regs with subs.<br>
<br>
For example, it I want to move one 64-bit virtual reg to another, I'm trying to use the following pattern:<br>
<br>
def LoReg: OutPatFrag<(ops node:$Rd), (EXTRACT_SUBREG (i64 $Rd), isub_lo)>;<br>
def HiReg: OutPatFrag<(ops node:$Rd), (EXTRACT_SUBREG (i64 $Rd), isub_hi)>;<br>
</span>def MOVi64rr : Pat<(set GPR64:$Rd, GPR64:$Rn), \<br>
</blockquote>
'set' isn't something you can have in an input pattern. It is for assigning a result to a register, it isn't a DAG operation you can match against. You might be looking for bitconvert?<span class="m_-1292206382351359339m_3056353952140647094HOEnZb"><font color="#888888"><br>
<br>
-Matt<br>
</font></span></blockquote>
</div>
<br>
</div>
</div>
</div></div></div>
</blockquote></div><br></div></div>