https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121358

--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
This patch fixes this issue:
```
diff --git a/gcc/simplify-rtx.cc b/gcc/simplify-rtx.cc
index c723a07f06b..c5f49ff2645 100644
--- a/gcc/simplify-rtx.cc
+++ b/gcc/simplify-rtx.cc
@@ -8460,7 +8460,8 @@ simplify_context::simplify_gen_subreg (machine_mode
outermode, rtx op,

   if (GET_CODE (op) == SUBREG
       || GET_CODE (op) == CONCAT
-      || GET_MODE (op) == VOIDmode)
+      || GET_MODE (op) == VOIDmode
+      || GET_CODE (op) == CONST_VECTOR)
     return NULL_RTX;

   if (MODE_COMPOSITE_P (outermode)


```

CONCAT was added with r0-64327-g4f1da2e923a3e7
(https://gcc.gnu.org/pipermail/gcc-patches/2004-December/157277.html).

If the CONST_INT didn't simplify it would be rejected because of the VOIDmode
check. Note I think CONST_POLY_INT should also be rejected for the same reason
as CONST_VECTOR. I suspect you could get a CONST_POLY_INT here with respect to
float subreg but I could be wrong.

Reply via email to