[PATCH] Call Type::isVectorTy() before calling Type::getVectorNumElements

Akira Hatanaka ahatanak at gmail.com
Wed Mar 27 17:09:01 PDT 2013


The attached patch adds code in InstCombiner::FoldSelectOpOp that checks if
a Type is a vector before calling function Type::getVectorNumElements.
Without this fix, the following command asserts:

$ opt instcombine1.ll -o instcombine1.bc -O3

Please review.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130327/a85441a2/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: instcombine1.patch
Type: application/octet-stream
Size: 1154 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130327/a85441a2/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: instcombine1.ll
Type: application/octet-stream
Size: 362 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130327/a85441a2/attachment-0001.obj>


More information about the llvm-commits mailing list