[llvm-commits] [PATCH] Fix bugs in promotion code for CTPOP and fiends

Jakob Stoklund Olesen stoklund at 2pi.dk
Sun Jul 12 06:26:04 PDT 2009


SelectionDAGLegalize::PromoteNode() has code to promote CTPOP, CTLZ,  
and CTTZ operations. I don't think that code has ever been used, it  
contains some trivial bugs in the value types used.

The attached patch fixes these issues, so the operation is performed  
as NVT, and then truncated back to OVT.

The blackfin processor has a CTPOP instruction for i32 registers only.  
The promotion code is needed to support CTPOP for i16 registers as well.

Please review before I commit.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: promote-ctpop.patch
Type: application/octet-stream
Size: 1628 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20090712/a8d49728/attachment.obj>


More information about the llvm-commits mailing list