Hi!
On Thu, Jan 22, 2026 at 04:12:57PM +0530, Kishan Parmar wrote:
> PR123055 showed a regression on power9 and power8 IEEE128 where
> gcc.target/powerpc/pr116030.c started emitting stxvd2x after
> r16-5947-ga6c50ec2c6ebcb.
>
> The regression was caused by -ffuse-ops-with-volatile-access, which
> allows volatile memory to satisfy general_operand.
That option never makes any sense *at all*. By the rules of C all side
effects have to be done on the actual machine the same as on the
abstract machine, so allowing any transformation to work against this is
ludicrous.
> This made
> vsx_stxvd2x4_le_const_<mode> match quad stores regardless of their
> actual alignment.
What makes that problematic?
> Introduce quad_unaligned_memory_operand and restrict
> vsx_stxvd2x4_le_const_<mode> to unaligned quad memory only. This
> ensures stxvd2x is emitted only when required and aligned cases
> continue to use stvx.
>
> Bootstrapped and Regtested on powerpc64le-linux-gnu.
> new file mode 100644
> index 00000000000..c7dccf528e6
> --- /dev/null
> +++ b/gcc/testsuite/gcc.target/powerpc/pr123055.c
> @@ -0,0 +1,19 @@
> +/* { dg-do compile } */
> +/* { dg-options "-mdejagnu-cpu=power8 -O2" } */
> +
> +/* { dg-final { scan-assembler-not "stvx" { target { le } } } } */
This needs to be tested on powerpcle-linux, then (32-bit LE stuff).
Yes, not many people ever use that, but it still is a supported
configuration.
Segher