[llvm-commits] FW: Vector promotion broken for <2 x [i8|i16]>

Villmow, Micah Micah.Villmow at amd.com
Fri Jul 27 15:57:56 PDT 2012


Making sure it goes to commits also.

From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of Villmow, Micah
Sent: Friday, July 27, 2012 3:54 PM
To: Developers Mailing List
Subject: [LLVMdev] Vector promotion broken for <2 x [i8|i16]>

Vector promotion which is new in LLVM 3.1 is broken for sub32 bit types. The problem is in the VectorLegalizer::PromoteVectorOp.
The function getTypeToPromoteTo will return a <2 x i32> for a <2 x i8>, <2 x i16> or <4 x i8>. The problem is that there are no vectors of size 1 defined for i32 or i16. The attached patch fixes these issues.

This can be reproduced by setting in any target:
setOperationAction(ISD::AND, MVT::i8, Promote);
setOperationAction(ISD::AND, MVT::v2i8, Promote);
setOperationAction(ISD::AND, MVT::i16, Promote);

Let me know if this is good,
Micah

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120727/ad8a4ac1/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: codegen_new_vec1_types.patch
Type: application/octet-stream
Size: 10556 bytes
Desc: codegen_new_vec1_types.patch
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120727/ad8a4ac1/attachment.obj>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ATT00001.txt
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120727/ad8a4ac1/attachment.txt>


More information about the llvm-commits mailing list