<div class="HOEnZb adM" style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><div class="im" style="color:rgb(80,0,80)">On Wed, Jan 23, 2013 at 5:06 PM, Cameron McInally <span dir="ltr"><<a href="mailto:cameron.mcinally@nyu.edu" target="_blank" style="color:rgb(17,85,204)">cameron.mcinally@nyu.edu</a>></span> wrote:<br>
</div></div><div class="gmail_quote" style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><div class="adM"><div class="adm" style="margin:5px 0px"></div><div class="im" style="color:rgb(80,0,80)">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div>On Wed, Jan 23, 2013 at 4:40 PM, Tim Northover <span dir="ltr"><<a href="mailto:t.p.northover@gmail.com" target="_blank" style="color:rgb(17,85,204)">t.p.northover@gmail.com</a>></span> wrote:<br>
</div><div class="gmail_quote"><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div>>> It doesn't look like TableGen supports Constraints beyond EARLY_CLOBBER<br>
>> and TIED_TO. We would need to add a constraint such as "$dst != $src1,<br>>> $dst != $mask, $src1 != $mask" to the current patterns to enforce the<br>>> rules.<br>> You can emulate such constraints via early clobbing. Just mark dst as<br>
> early clobbing.<br><br></div>How would that (or any early clobbering) enforce $src1 != $mask? Or is<br>it a fortuitous side-effect of implementation?</blockquote><div><br></div></div><div>In this case, $src1 is also the destination register. A masked gather will merge the conditionally selected elements into the input vector.</div>
<font color="#888888"><br></font></div></blockquote><div><br></div></div></div><div>Sorry, I was looking at the gather pattern and not at Dave's example. EARLY_CLOBBER should be *sufficient*. </div><div><br></div><div>
For a masked gather, all source operands are live entering the instruction. No problem there.</div><div><br></div><div>For an unmasked gather, the mask and index vector are live entering the instruction. The input vector can be undefined though, which leads to the problem of having the index vector being reused as the destination. Marking the destination as EARLY_CLOBBER should sort that out.</div>
<div><br></div><div>-Cameron</div></div>