This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Partial combiner fix for vector conditions (PR rtl-optimization/87065)
- From: Segher Boessenkool <segher at kernel dot crashing dot org>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Richard Biener <rguenther at suse dot de>, gcc-patches at gcc dot gnu dot org
- Date: Mon, 27 Aug 2018 04:29:25 -0500
- Subject: Re: [PATCH] Partial combiner fix for vector conditions (PR rtl-optimization/87065)
- References: <20180827072416.GD2218@tucnak>
On Mon, Aug 27, 2018 at 09:24:16AM +0200, Jakub Jelinek wrote:
> This patch is just a partial fix, combine.c has lots of other code that was
> written before vector modes were introduced and won't work well with them.
Yeah. But somehow it works fine almost all of the time. Maybe most
things with vector are just not attempted at all?
> The patch also uses ? x : const_true_rtx rather than
> ? CONSTM1_RTX (GET_MODE (x)) : const_true_rtx
> or some new CONST_TRUE_RTX (GET_MODE (x)), so that it is backportable, that
> can be changed on the trunk incrementally.
Okay, makes sense.
> @@ -9335,6 +9335,7 @@ if_then_else_cond (rtx x, rtx *ptrue, rt
> if (COMPARISON_P (cond0)
> && COMPARISON_P (cond1)
> + && SCALAR_INT_MODE_P (mode)
> && ((GET_CODE (cond0) == reversed_comparison_code (cond1, NULL)
> && rtx_equal_p (XEXP (cond0, 0), XEXP (cond1, 0))
> && rtx_equal_p (XEXP (cond0, 1), XEXP (cond1, 1)))
It would do this for float as well before. Did that not work? Or, you
want !VECTOR_MODE_P instead?
Okay with that fixed. Thanks,