<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:Helvetica;
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Hi Hal,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">I have attached a new TableGen.patch correcting
</span><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:black">bool addToDefs = false;
</span><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">To be named
</span><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:black">AddToDefs.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Right, this patch deals with the case of
</span><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:black">NumDefs > NumOutOps</span><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">.
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Also, sorry about the late reply. I’ve been OOO.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Let me know if there is any other changes for this patch submission.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Thanks!<o:p></o:p></span></p>
<div>
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black;text-transform:uppercase">Aaron (En Ye) Shi</span></b><span style="font-size:10.0pt;font-family:"Calibri",sans-serif;color:black">  <br>
PEY, SW Engineering | Stream OpenCL<br>
1 Commerce Valley Dr E, Markham, ON L3T 3X6<br>
<b>O</b> +(1) 289-695-0685    <b>M</b> +(1) 647-709-3020<br>
<b>AMD</b> </span><a href="https://www.facebook.com/AMD"><span style="font-size:10.0pt;font-family:"Calibri",sans-serif;color:black">facebook</span></a><span style="font-size:10.0pt;font-family:"Calibri",sans-serif;color:black">  | 
</span><a href="http://www.amd.com/"><span style="font-size:10.0pt;font-family:"Calibri",sans-serif;color:black">amd.com</span></a><span style="font-size:10.0pt;font-family:"Calibri",sans-serif;color:black"><o:p></o:p></span></p>
</div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> Hal Finkel [mailto:hfinkel@anl.gov]
<br>
<b>Sent:</b> Tuesday, October 27, 2015 7:33 PM<br>
<b>To:</b> Matt Arsenault <arsenm2@gmail.com><br>
<b>Cc:</b> Shi, Aaron (en ye) <Aaronenye.Shi@amd.com>; llvm-commits@lists.llvm.org<br>
<b>Subject:</b> Re: [PATCH] TableGen CGIOperandList should use NumOutOperands instead of NumDefs<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:black"><o:p> </o:p></span></p>
<div class="MsoNormal" align="center" style="text-align:center"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:black">
<hr size="2" width="100%" align="center">
</span></div>
<blockquote style="border:none;border-left:solid #1010FF 1.5pt;padding:0in 0in 0in 4.0pt;margin-left:3.75pt;margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal" style="margin-bottom:12.0pt"><b><span style="font-family:"Helvetica",sans-serif;color:black">From:
</span></b><span style="font-family:"Helvetica",sans-serif;color:black">"Matt Arsenault" <</span><a href="mailto:arsenm2@gmail.com"><span style="font-family:"Helvetica",sans-serif">arsenm2@gmail.com</span></a><span style="font-family:"Helvetica",sans-serif;color:black">><br>
<b>To: </b>"Hal Finkel" <</span><a href="mailto:hfinkel@anl.gov"><span style="font-family:"Helvetica",sans-serif">hfinkel@anl.gov</span></a><span style="font-family:"Helvetica",sans-serif;color:black">><br>
<b>Cc: </b>"Aaron Shi (en ye)" <</span><a href="mailto:Aaronenye.Shi@amd.com"><span style="font-family:"Helvetica",sans-serif">Aaronenye.Shi@amd.com</span></a><span style="font-family:"Helvetica",sans-serif;color:black">>,
</span><a href="mailto:llvm-commits@lists.llvm.org"><span style="font-family:"Helvetica",sans-serif">llvm-commits@lists.llvm.org</span></a><span style="font-family:"Helvetica",sans-serif;color:black"><br>
<b>Sent: </b>Tuesday, October 27, 2015 6:18:14 PM<br>
<b>Subject: </b>Re: [PATCH] TableGen CGIOperandList should use NumOutOperands instead of NumDefs<br>
<br>
<o:p></o:p></span></p>
<div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class="MsoNormal"><span style="font-family:"Helvetica",sans-serif;color:black">On Oct 27, 2015, at 7:08 PM, Hal Finkel via llvm-commits <</span><a href="mailto:llvm-commits@lists.llvm.org" target="_blank"><span style="font-family:"Helvetica",sans-serif">llvm-commits@lists.llvm.org</span></a><span style="font-family:"Helvetica",sans-serif;color:black">>
 wrote:<o:p></o:p></span></p>
</div>
<p class="MsoNormal"><span style="font-family:"Helvetica",sans-serif;color:black"><o:p> </o:p></span></p>
<div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:black">Hi Aaron,<br>
<br>
+  bool addToDefs = false;<br>
<br>
This should be named AddToDefs (local variables in LLVM start with a capital letter).<br>
<br>
Can you provide a small TableGen snippet showing the kinds of definitions this affects?<br>
<br>
Thanks,<br>
Hal<o:p></o:p></span></p>
</div>
</div>
</blockquote>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Helvetica",sans-serif;color:black">These can be found in HSAILInstrFormats.td (in </span><a href="http://reviews.llvm.org/D9751" target="_blank"><span style="font-family:"Helvetica",sans-serif">http://reviews.llvm.org/D9751</span></a><span style="font-family:"Helvetica",sans-serif;color:black">) in
 multiclass LD_Types for the multiple result load instructions<o:p></o:p></span></p>
</div>
</blockquote>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:black"><br>
Alright, I see this:<br>
<br>
multiclass LD_Types<string opName, bits<16> BrigVal> {<br>
  def _S8 : LD<opName, BrigVal, (outs GPR32:$dest)>,<br>
            LdStVectorMap<NAME#"_S8", 1>;<br>
  def _U8 : LD<opName, BrigVal, (outs GPR32:$dest)>,<br>
            LdStVectorMap<NAME#"_U8", 1>;<br>
  ...<br>
  def _V2_S8 : LD<opName#"_v2", BrigVal, (outs Vec2DestOp32:$dest)>,<br>
               LdStVectorMap<NAME#"_S8", 2>;<br>
  def _V2_U8 : LD<opName#"_v2", BrigVal, (outs Vec2DestOp32:$dest)>,<br>
               LdStVectorMap<NAME#"_U8", 2>;<br>
  ...<br>
<br>
and these have one element in their 'outs' list. However, these vector operands are actually complex operands:<br>
<br>
<br>
<o:p></o:p></span></p>
<pre><span style="color:black">  def Vec2DestOp32 : Operand<untyped> {<br>    let MIOperandInfo = (ops HSAILDest32Operand, HSAILDest32Operand);<br>    let PrintMethod = "printVec2Op";<br>  }<o:p></o:p></span></pre>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:black">So this patch deals with the case where NumDefs > NumOutOps. That makes sense.<br>
<br>
 -Hal<br>
<br>
-- <o:p></o:p></span></p>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:black">Hal Finkel<br>
Assistant Computational Scientist<br>
Leadership Computing Facility<br>
Argonne National Laboratory<o:p></o:p></span></p>
</div>
</div>
</div>
</body>
</html>