On Tue, 2 Jul 2019 at 16:59, Richard Sandiford wrote: > > Thanks for fixing this. > > Prathamesh Kulkarni writes: > > diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c > > index 89a46a933fa..79bd0cfbd28 100644 > > --- a/gcc/simplify-rtx.c > > +++ b/gcc/simplify-rtx.c > > @@ -6697,6 +6697,19 @@ simplify_subreg (machine_mode outermode, rtx op, > > } > > } > > > > + /* If op is a vector comparison operator, rewrite it in a new mode. > > + This probably won't match, but may allow further simplifications. > > + Also check if number of elements and size of each element > > + match for outermode and innermode. */ > > + > > Excess blank line after the comment. IMO the second part of the comment > reads too much like an afterthought. How about: > > /* If OP is a vector comparison and the subreg is not changing the > number of elements or the size of the elements, change the result > of the comparison to the new mode. */ > > > + if (COMPARISON_P (op) > > + && VECTOR_MODE_P (outermode) > > + && VECTOR_MODE_P (innermode) > > + && (known_eq (GET_MODE_NUNITS (outermode), GET_MODE_NUNITS (innermode))) > > + && (known_eq (GET_MODE_UNIT_SIZE (outermode), > > + GET_MODE_UNIT_SIZE (innermode)))) > > Redundant brackets around the known_eq calls. > > > + return gen_rtx_fmt_ee (GET_CODE (op), outermode, XEXP (op, 0), XEXP (op, 1)); > > This should use simplify_gen_relational, so that we try to simplify > the new expression. Does the attached version look OK ? Thanks, Prathamesh > > Richard