This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Partial combiner fix for vector conditions (PR rtl-optimization/87065)


Hi Jakub,

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,


Seghr


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]