[llvm-commits] [PATCH] Fix PR13220

Michael Liao michael.liao at intel.com
Thu Jul 12 00:47:54 PDT 2012


Yeah, you're right. But, if the promoted type is not legal, i.e.
extended type. The result extending assumes the bit-width of the
extracted data is the same as the element of the input vector. Here is
the latest patch distinguishing whether the promoted data result is
legal or not. When the promoted data type is extended one, just
any-extend the input vector first and then extract element; otherwise,
just follow the previous behavior.

Yours
- Michael

On Thu, 2012-07-12 at 09:18 +0200, Duncan Sands wrote:
> Hi Michael,
> > Please review the attached patch fixing PR13220. With this patch, the
> > test case in PR13220 is passed as well as 'make check-all'. Test cases
> > are included in this patch.
> 
> it is legal for EXTRACT_VECTOR_ELT to return a wider type than the input
> vector element type.  Here's the doc from ISDOpcodes.h:
> 
>      /// EXTRACT_VECTOR_ELT(VECTOR, IDX) - Returns a single element from VECTOR
>      /// identified by the (potentially variable) element number IDX.  If the
>      /// return type is an integer type larger than the element type of the
>      /// vector, the result is extended to the width of the return type.
>      EXTRACT_VECTOR_ELT,
> 
> So if this is causing crashes then the bug is probably somewhere else, in some
> code that isn't expecting this.
> 
> Ciao, Duncan.
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fixes-PR13220.patch
Type: text/x-patch
Size: 2822 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120712/c6a20cc4/attachment.bin>


More information about the llvm-commits mailing list