[PATCH] Fix constant folding for one lane vectors (PR15611)

Silviu Baranga silbar01 at arm.com
Fri Apr 12 07:29:13 PDT 2013


Hi,

The attached patch fixes constant folding for one lane vectors,
which is the root cause for PR15611. The faulty code path is
taken by scalarizing vector code during type legalization.

The constant folding code will currently return a scalar when
taking one lane input vectors, which can cause an assertion failure
later.

The changed code was wrong because if the size of the output vector
is 1, we can still be in the case where we need to return a one lane
vector.

Please review!

Thanks,
Silviu
-------------- next part --------------
A non-text attachment was scrubbed...
Name: v1-constant-fold.diff
Type: application/octet-stream
Size: 1313 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130412/0dfc2ab9/attachment.obj>


More information about the llvm-commits mailing list