https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127597
Frédéric Mahé <frederic.mahe at cirad dot fr> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |frederic.mahe at cirad dot fr
--- Comment #9 from Frédéric Mahé <frederic.mahe at cirad dot fr> ---
Additional data from native testing on a Banana Pi BPI-F3 (SpacemiT K1,
VLEN=256, Linux 6.18, which does not emulate misaligned vector
accesses). Trunk r17 728d0bebb85 (20261120), configured with
--with-arch=rv64gcv_zba_zbb_zbc_zbs_zicond_zfh_zvfh_zvl256b, no
--with-tune.
These torture tests die with SIGBUS (cause 6, misaligned store) at
every optimization level, and only at -O0 for pr52419:
gcc.dg/torture/pr57748-1.c .. pr57748-4.c
gcc.dg/torture/pr58041.c
gcc.dg/torture/pr52419.c (-O0)
They pass in the RISE CI (qemu, rv64gcv and zvl256b), probably because
qemu does not trap on misaligned vector accesses, which would explain
why the failures do not show up there.
pr57748-1.c at -O2, with or without -mvector-strict-align:
foo:
vsetivli zero,2,e64,m1,ta,ma
vid.v v1
addi a0,a0,16
vadd.vi v0,v1,3
vse64.v v0,0(a0)
ret
Here p points into a packed struct (P is aligned(1)), so a0+16 is
odd, and vse64.v traps. -mtune=spacemit-x60 gives the same code;
-march=rv64gc passes.