Commit fa213633 by Jakub Jelinek Committed by Jakub Jelinek

re PR rtl-optimization/92510 (ICE in native_encode_rtx, at simplify-rtx.c:6272)

	PR rtl-optimization/92510
	* combine.c (gen_lowpart_for_combine): Only transform lowpart subreg
	of comparison into a comparison with different mode if both imode and
	omode are scalar integral modes.

	* gcc.dg/pr92510.c: New test.

From-SVN: r278777
parent 861d4af8
2019-11-27 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/92510
* combine.c (gen_lowpart_for_combine): Only transform lowpart subreg
of comparison into a comparison with different mode if both imode and
omode are scalar integral modes.
2019-11-27 Vladimir Makarov <vmakarov@redhat.com> 2019-11-27 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/90007 PR rtl-optimization/90007
...@@ -11812,7 +11812,9 @@ gen_lowpart_for_combine (machine_mode omode, rtx x) ...@@ -11812,7 +11812,9 @@ gen_lowpart_for_combine (machine_mode omode, rtx x)
/* If X is a comparison operator, rewrite it in a new mode. This /* If X is a comparison operator, rewrite it in a new mode. This
probably won't match, but may allow further simplifications. */ probably won't match, but may allow further simplifications. */
else if (COMPARISON_P (x)) else if (COMPARISON_P (x)
&& SCALAR_INT_MODE_P (imode)
&& SCALAR_INT_MODE_P (omode))
return gen_rtx_fmt_ee (GET_CODE (x), omode, XEXP (x, 0), XEXP (x, 1)); return gen_rtx_fmt_ee (GET_CODE (x), omode, XEXP (x, 0), XEXP (x, 1));
/* If we couldn't simplify X any other way, just enclose it in a /* If we couldn't simplify X any other way, just enclose it in a
......
2019-11-27 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/92510
* gcc.dg/pr92510.c: New test.
2019-11-27 Andrew Sutton <asutton@lock3software.com> 2019-11-27 Andrew Sutton <asutton@lock3software.com>
PR c++/92236 PR c++/92236
......
/* PR rtl-optimization/92510 */
/* { dg-do compile } */
/* { dg-options "-O1 -ftree-loop-vectorize -fno-forward-propagate -fno-tree-scev-cprop" } */
int v;
long int
foo (long int x)
{
signed char i;
for (i = 0; i < 8; ++i)
x |= !!v;
return x + i;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment