[llvm-commits] Patch: LegalizeType for promoting some operands
Mon Ping Wang
monping at apple.com
Sat Dec 13 00:59:09 PST 2008
Hi,
This is a patch to add some support to legalize some operands
- ExpandOp_SCALAR_TO_VECTOR by using build vector
- ExpandOp_INSERT_VECTOR_ELT by bit casting the input vector to the
expand type, insert the expanded operand, and casting it back.
- A modification to PromoteIntRes_EXTRACT_VECTOR_ELT to check if the
extract vector element type is the expected promoted type and if not,
then extend the result.
For the last one, I ran into the case where I was doing a add of two 8
bit integers where one integer is extracted from a vector element
where only a 32 bit was available. In the promotion code, the first
operand was promoted to 32 bits but the extract vector element was
promoted to 16 bits. This causes a problem when the add was promoted
to 32 bits and checked its two input operand type.
Please let me know if you have any comments.
Thanks,
-- Mon Ping
-------------- next part --------------
A non-text attachment was scrubbed...
Name: legalize.patch
Type: application/octet-stream
Size: 5242 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20081213/8e194b22/attachment.obj>
More information about the llvm-commits
mailing list