The clrmem* patterns don't use the provided alignment information,
hence the setmemhi expander can just pass down 0 as alignment to
the clrmem* insns.
PR target/85624
gcc/
* config/avr/avr.md (setmemhi): Set alignment to 0.
gcc/testsuite/
* gcc.target/avr/torture/pr85624.c: New test.
gen_int_mode (INTVAL (operands[1]), mode));
rtx addr0 = copy_to_mode_reg (Pmode, XEXP (operands[0], 0));
operands[0] = gen_rtx_MEM (BLKmode, addr0);
+ // Alignment is unused; just set it to 0.
+ operands[3] = const0_rtx;
})
--- /dev/null
+/* { dg-do compile } */
+
+int foo (void)
+{
+ volatile int arr[3] __attribute__((aligned(128))) = { 0 };
+ return arr[2];
+}