[llvm-commits] [llvm] r60740 - in /llvm/trunk: docs/LangRef.html lib/CodeGen/SelectionDAG/LegalizeDAG.cpp lib/CodeGen/SelectionDAG/SelectionDAG.cpp test/CodeGen/X86/vshift_split.ll

Mon Ping Wang wangmp at apple.com
Tue Dec 9 01:28:10 PST 2008


Hi Duncan,

In the current LangRef, for shl (and the other shifts),

<result> = lshr <ty> <op1>, <op2>
...
Arguments:
Both arguments to the 'lshr' instruction must be the same integer or  
vector of integer type. 'op2' is treated as an unsigned value.
-----

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.

Looking at it again, I think it would be more clear if in the  
semantics section, we added
   "If the arguments are vectors, each vector element of 'op1'  is  
shifted by the corresponding element in the shift amount 'op2'."

I'll do that tomorrow,
-- Mon Ping


On Dec 9, 2008, at 9:47 AM, Duncan Sands wrote:

> Hi Mon Ping,
>
>> Fix getNode to allow a vector for the shift amount for shifts of  
>> vectors.
>
> is this kind of possibility documented anywhere?  There is no  
> mention of it
> in SelectionDAGNodes.h.  Maybe in the LangRef?
>
> Ciao,
>
> Duncan.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20081209/188f99fa/attachment.html>


More information about the llvm-commits mailing list