[llvm-commits] [PATCH] Fix assertion failure with shufflevectors on ARM

Eli Friedman eli.friedman at gmail.com
Tue Aug 14 11:49:08 PDT 2012


On Tue, Aug 14, 2012 at 8:29 AM, James Molloy <James.Molloy at arm.com> wrote:
> Hi Eli,
>
> Thanks for that. I've attached another patch, written by Stepan
> Dyatkovskiy, that fixes the primary issue in a different way (bitcast
> instead of bail out) and because of this I cannot now reproduce the
> secondary issue (which was dead nodes remaining live).
>
> Could you please review the attached patch? Is it OK to commit?

+          unsigned factor = OutItemBits / ItemBits;
+          assert(VecIn1.getValueType().getVectorNumElements() % factor == 0 &&
+                 "Vec1 should be transformed (bitcasted) to output type "
+                 "without remainder.");

This bit of math looks unsafe... can you actually guarantee this
assertion holds?  It seems like it would be more straightforward to
put the bitcast after the concat_vectors.

-Eli



More information about the llvm-commits mailing list