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

--- Comment #3 from Bernd Edlinger <bernd.edlinger at hotmail dot de> ---
Yes, indeed something like the following seems to fix the issue:

diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c
index d13c390..56271e9 100644
--- a/gcc/simplify-rtx.c
+++ b/gcc/simplify-rtx.c
@@ -7217,6 +7217,7 @@ simplify_context::simplify_subreg (machine_mode outermode
          have instruction to move the whole thing.  */
       && (! MEM_VOLATILE_P (op)
          || ! have_insn_for (SET, innermode))
+      && (STRICT_ALIGNMENT && GET_MODE_ALIGNMENT (outermode) < MEM_ALIGN (op))
       && known_le (outersize, innersize))
     return adjust_address_nv (op, outermode, byte);

Reply via email to