[PATCH] D104808: [clang][emscripten] Reduce alignof long double from 16 to 8 bytes

Dan Gohman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 23 13:02:24 PDT 2021


sunfish added a comment.

Do we still intend to unify Emscripten's ABI with wasm32-unknown-unknown or wasm32-wasi eventually? This is talking a step away from that.

One of the assumptions behind this is that it would be ok for malloc to be 16-byte aligned anyway, because SIMD use cases benefit from being able to call `malloc` and get a buffer aligned for SIMD. Do we have more information on how much this matters in practice?

Another observation is that part of the reason for long double being 128-bit is to leave room for the possibility of 128-bit floats being added to wasm some day, and on x86-64, aarch64, and powerpc which all have 128-bit long double on Linux, the alignment is 16 bytes.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D104808/new/

https://reviews.llvm.org/D104808



More information about the cfe-commits mailing list