This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/53366] wrong code generation by tree vectorizer using AVX
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 18 May 2012 10:36:04 +0000
- Subject: [Bug tree-optimization/53366] wrong code generation by tree vectorizer using AVX
- Auto-submitted: auto-generated
- References: <bug-53366-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53366
--- Comment #8 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-05-18 10:36:04 UTC ---
(In reply to comment #7)
> Indeed,
>
> --- gcc/tree-vect-slp.c.jj 2012-04-19 11:09:13.000000000 +0200
> +++ gcc/tree-vect-slp.c 2012-05-17 10:47:30.124290361 +0200
> @@ -1199,7 +1199,8 @@ vect_supported_load_permutation_p (slp_i
>
> /* We checked that this case ok, so there is no need to proceed with
> permutation tests. */
> - if (complex_numbers == 2)
> + if (complex_numbers == 2
> + && VEC_length (slp_tree, SLP_INSTANCE_LOADS (slp_instn)) == 2)
> {
> VEC_free (slp_tree, heap, SLP_INSTANCE_LOADS (slp_instn));
> VEC_free (int, heap, SLP_INSTANCE_LOAD_PERMUTATION (slp_instn));
>
> alone fixes this as the further load permutation checks fail. Whether this is
> the right fix and whether it is sufficient, no idea unfortunately, not familiar
> enough with the interleaving code. Richard or Michael, any thoughts?
I'm not very familiar with the code, but the above looks sensible and safe
at least.