[llvm-commits] [PATCH] Fix PR13220

Duncan Sands baldrick at free.fr
Thu Jul 12 00:52:05 PDT 2012


Hi Michael,

> 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.

I was unable to parse these sentences.  Can you please say it again
differently.

Thanks, Duncan.

  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
>





More information about the llvm-commits mailing list