[llvm] [WebAssembly] Fix lowering of (extending) loads from addrspace(1) globals (PR #155937)
Derek Schuff via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 7 16:12:23 PDT 2025
dschuff wrote:
> I would say that, yes, this is certainly a correctness bug.
>
> So correctness in an unusual use-case wins over optimizations in a more common one... got it.
>
I don't know if I'd categorically say that :)
Correctness is obviously more important than performance, but just how obscure the feature is is still important. And we're pretty far down the ladder with addrspace(1) globals because the feature was never really finished in the first place. You could make the argument that we should take it out rather than having it in a broken state. I'm still hoping we can improve it to something usable, but I would not want to compromise performance of mainstream use cases if we can possibly help it.
It seemed from your comment in https://github.com/llvm/llvm-project/pull/157627#issuecomment-3275886331 that you had an idea about how to make that PR work; I do like that approach better (assuming it actually works and ends up somewhat close to the current state of that PR) and it seems like it might be worth trying to go just a little bit further down the rabbit hole. One concern I do have with that approach would be whether we'd need to take it further (e.g. make truncating stores symmetric?), or whether it would be good enough at that.
https://github.com/llvm/llvm-project/pull/155937
More information about the llvm-commits
mailing list