[WebAssembly] Set alignment to 1 for SIMD memory intrinsics
authorThomas Lively <tlively@google.com>
Wed, 5 May 2021 18:59:33 +0000 (11:59 -0700)
committerThomas Lively <tlively@google.com>
Wed, 5 May 2021 18:59:33 +0000 (11:59 -0700)
commit89333b35a7a909d29ae53fddcfb4792d87223b96
tree6a9a9cdc4371b6b8703c968c32ed894cfacec47f
parent25fe17d3c1041de7e2dc5df865d7f65fd074f9a6
[WebAssembly] Set alignment to 1 for SIMD memory intrinsics

The WebAssembly SIMD intrinsics in wasm_simd128.h generally try not to require
any particular alignment for memory operations to be maximally flexible. For
builtin memory access functions and their corresponding LLVM IR intrinsics,
there's no way to set the expected alignment, so the best we can do is set the
alignment to 1 in the backend. This change means that the alignment hints in the
emitted code will no longer be incorrect when users use the intrinsics to access
unaligned data.

Differential Revision: https://reviews.llvm.org/D101850
llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
llvm/test/CodeGen/WebAssembly/simd-load-lane-offset.ll
llvm/test/CodeGen/WebAssembly/simd-load-zero-offset.ll