]> git.proxmox.com Git - mirror_zfs.git/commit
Drop lying to the compiler in the fletcher4 code
authorRich Ercolani <214141+rincebrain@users.noreply.github.com>
Fri, 24 Mar 2023 17:29:19 +0000 (13:29 -0400)
committerGitHub <noreply@github.com>
Fri, 24 Mar 2023 17:29:19 +0000 (10:29 -0700)
commit0ad5f4344238b548e2240a405d418f7af9290623
tree17dd3ad03ca6edbcb56ac581661706476f6cc836
parent460d887c439079422b642da87a77dbb896f5e64a
Drop lying to the compiler in the fletcher4 code

This is probably the uncontroversial part of #13631, which fixes
a real problem people are having.

There's still things to improve in our code after this is merged,
but it should stop the breakage that people have reported, where
we lie about a type always being aligned and then pass in stack
objects with no alignment requirement and hope for the best.

Of course, our SIMD code was written with unaligned accesses, so it
doesn't care if we drop this...but some auto-vectorized code that
gcc emits sure does, since we told it it can assume they're aligned.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de>
Reviewed-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Signed-off-by: Rich Ercolani <rincebrain@gmail.com>
Closes #14649
include/zfs_fletcher.h
module/zcommon/zfs_fletcher.c
module/zcommon/zfs_fletcher_aarch64_neon.c
module/zcommon/zfs_fletcher_avx512.c
module/zcommon/zfs_fletcher_intel.c
module/zcommon/zfs_fletcher_sse.c
module/zcommon/zfs_fletcher_superscalar.c
module/zcommon/zfs_fletcher_superscalar4.c