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

Alon Zakai via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 23 13:17:27 PDT 2021


kripken added a comment.

In D104808#2836942 <https://reviews.llvm.org/D104808#2836942>, @sunfish wrote:

> 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.

I definitely think we should unify them as much as possible. Ideally we would all make this change.

The motivation for the change is that right now we are losing either some correctness or some performance. Either is a burden, and a possible future float128 in wasm doesn't seem strong enough of a justification to me - should wasm add float128, we can consider a new ABI at that point. Does that sound reasonable?

> 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?

I think the discussions converged on it being ok with the spec, but perhaps a problem in practice, but portable SIMD code seems smart enough to avoid the issue. I don't think I've seen a bug report mentioning SIMD, but I may have missed one.


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