From fa21363375a2ff71ded325e6debe890e561a9743 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Wed, 27 Nov 2019 17:32:54 +0100 Subject: 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 --- gcc/combine.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'gcc/combine.c') diff --git a/gcc/combine.c b/gcc/combine.c index 3fbd84f..16e606d 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -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 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)); /* If we couldn't simplify X any other way, just enclose it in a -- cgit v1.1