[PATCH] Fix PR17546

Michael Liao michael.liao at intel.com
Tue Oct 15 09:17:00 PDT 2013


Hi

The attached patch fixes PR17546. The root cause is that the assertion
is too strong as the index type used in
extract_vector_elt/insert_vector_elt is supposed to be
TLI.getVectorIdxTy() which is a pointer type on most targets. On 64-bit
target with <N x i32> vector element extraction, it's a legal case with
32-bit mask element but 64-bit vector index. This patch fixes that by
truncating or zero-extending that index into mask element type. As that
truncation or zero-extending will be translated into subreg in most
time. It won't generate additional code compared to previous code.

Thanks for review
- Michael 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Fix-PR17546.patch
Type: text/x-patch
Size: 2180 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131015/d9c5c824/attachment.bin>


More information about the llvm-commits mailing list