Silence overactive sanity check with -fpartial-profile-training
[gcc.git] / gcc / combine.c
index 3fbd84fcb808b8e0d2d07cfc4d7423030f50b25f..16e606d8a21ff424ff313d16a201055b2d3ce285 100644 (file)
@@ -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