<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Duncan,<div><br></div><div>In the current LangRef, for shl (and the other shifts),<span class="Apple-style-span" style="font-family: Monaco; font-size: 11px; white-space: pre; "></span></div><div><br></div><div><span class="Apple-style-span" style="font-family: Monaco; font-size: 11px; white-space: pre; "><result> = lshr <ty> <op1>, <op2></span></div><div><font class="Apple-style-span" face="Monaco" size="3"><span class="Apple-style-span" style="font-size: 11px; white-space: pre;">...</span></font></div><div><font class="Apple-style-span" face="Monaco" size="3"><span class="Apple-style-span" style="font-size: 11px; white-space: pre;"><span class="Apple-style-span" style="font-family: Times; white-space: normal; font-size: 12px; font-weight: bold; ">Arguments:</span></span></font></div><div><span class="Apple-style-span" style="font-family: Times; font-size: 14px; ">Both arguments to the '<tt><font class="Apple-style-span" face="Monaco" size="3"><span class="Apple-style-span" style="font-size: 11px;">lshr</span></font></tt>' instruction must be the same <a href="http://llvm.org/docs/LangRef.html#t_integer">integer</a> or <a href="http://llvm.org/docs/LangRef.html#t_vector">vector</a> of integer type. '<tt><font class="Apple-style-span" face="Monaco" size="3"><span class="Apple-style-span" style="font-size: 11px;">op2</span></font></tt>' is treated as an unsigned value.</span></div><div>-----</div><div><br></div><div>I read the first sentence as stating that op1 and op2 must be either both be integers or both be vectors of integers and it is illegal to have vector for op1 and an integer for op2. The patch added an example of doing a vector shift.</div><div><div><div><br class="Apple-interchange-newline">Looking at it again, I think it would be more clear if in the semantics section, we added</div><div>  "If the arguments are vectors, each vector element of 'op1'  is shifted by the corresponding element in the shift amount 'op2'."</div><div><br></div><div>I'll do that tomorrow,</div></div><div>-- Mon Ping</div></div><div><br></div><div><br><div><div>On Dec 9, 2008, at 9:47 AM, Duncan Sands wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Hi Mon Ping,<br><br><blockquote type="cite">Fix getNode to allow a vector for the shift amount for shifts of vectors.<br></blockquote><br>is this kind of possibility documented anywhere?  There is no mention of it<br>in SelectionDAGNodes.h.  Maybe in the LangRef?<br><br>Ciao,<br><br>Duncan.<br></div></blockquote></div><br></div></body></html>