[llvm-commits] vector widening patch

Mon Ping Wang monping at apple.com
Sat Oct 18 14:53:08 PDT 2008


Hi,

We should avoid add this to LegalizeActions unless we feel that it is  
much cleaner to do so because it will require another bit that we  
currently don't have (we would need another word).  However, since we  
are moving away from this, it is a moot point.

At the time when I first implemented this, I remembering discussing  
using promote vs expand.  I started with promote but moved away from  
at the time because we were concerned that there were instances where  
we would want to promote a vector, i.e., v4i8 to v4i32 and I didn't  
want to get the two concepts confused, e.g.,  we first widen a vector  
than promote to a large type (v3i8 to v4i8 to v4i32).  This meant  
overloading expand even more as I rationalized that as expand is  
deciding to either scalarize or widen vector based on what was better  
to do.  However, I'm coming more to a conclusion that it doesn't make  
that much sense to promote a vector type so I don't mind using  
"promote" for widening.

   -- Mon Ping


On Oct 18, 2008, at 11:51 AM, Duncan Sands wrote:

>>> how about adding Widen to LegalizeAction, to make things uniform  
>>> with
>>> expand and promote.  Also, I think it would be better to do this in
>>> LegalizeTypes [*] rather than in LegalizeDAG - it's the future, and
>>> it's also much cleaner.
>>
>> Wouldn't it make sense to use 'expand' to mean "scalarize" and
>> 'promote' to mean "widen"?
>
> Yeah, LegalizeTypes already converts Expand into one of
> ExpandInteger, SoftenFloat, ExpandFloat, ScalarizeVector
> or SplitVector.  It could turn Promote into either
> PromoteInteger (like now) or WidenVector in a similar way.
> No need to add it to LegalizeAction (that suggestion was a
> thinko on my part).
>
> Ciao,
>
> Duncan.
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list