This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/70923] [7 regression] gcc.dg/vect/pr60092.c etc. FAIL
- From: "ro at CeBiTec dot Uni-Bielefeld.DE" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 31 May 2016 13:07:58 +0000
- Subject: [Bug tree-optimization/70923] [7 regression] gcc.dg/vect/pr60092.c etc. FAIL
- Auto-submitted: auto-generated
- References: <bug-70923-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70923
--- Comment #4 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot Uni-Bielefeld.DE> ---
> --- Comment #3 from Marc Glisse <glisse at gcc dot gnu.org> ---
> (In reply to Richard Biener from comment #1)
>> We have vect_recog_mult_pattern that should have triggered here but that
>> only tries replacement with LSHIFT_EXPR rather than also a simple plus
>> for 2 * x.
>
> I guess that would be something like
>
> --- tree-vect-patterns.c (revision 236808)
> +++ tree-vect-patterns.c (working copy)
> @@ -2226,7 +2226,13 @@ vect_recog_mult_pattern (vec<gimple *> *
> power2_neg_val = wi::exact_log2 (wi::neg (oprnd1));
>
> /* Handle constant operands that are postive or negative powers of 2. */
> - if (power2_val != -1)
> + if (power2_val == 1)
> + {
> + pattern_stmt
> + = gimple_build_assign (vect_recog_temp_ssa_var (itype, NULL),
> + PLUS_EXPR, oprnd0, oprnd0);
> + }
> + else if (power2_val != -1)
> {
> shift = build_int_cst (itype, power2_val);
> pattern_stmt
>
> and something similar for the case *-2, it may be nicer to put this new ==1
> case inside the !=-1 case (especially for power2_neg_val). But I don't think I
> can easily test that, no sparc in the compile farm.
That patch alone didn't make a difference when just rebuilding cc1 and
running the affected test cases. If you provide me with a
complete patch, I can easily run it through its paces, though.
Rainer