[llvm-commits] extract vector legalize type patch

Mon Ping Wang wangmp at apple.com
Wed Jan 28 00:41:58 PST 2009


Hi,

This patch is to fixed the following problem.  Consider the following  
code for an architecture where i8 is not a legal type but a vector <4  
x i8) is.
       %shuf = shufflevector <4 x i8> %val1, <4 x i8> undef, <3 x i32>  
<i32 0, i32 3, i32 2>; yields <3 x i8>
       %res =  extractelement <3 x i8> %shuf, i32 1;

The shuffle vector will be widen to a 4xi8.  In the extract element,  
we need to promote the i8 to i32 but it uses %shuf instead of the  
widen version of %shuf.  This patch check if the action for the input  
is to widen and if so, uses the widen value.

-- Mon Ping

-------------- next part --------------
A non-text attachment was scrubbed...
Name: promotewiden.patch
Type: application/octet-stream
Size: 634 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20090128/04f8406d/attachment.obj>


More information about the llvm-commits mailing list