[PATCH] D49517: [WebAssembly] Handle return type conversions in FixFunctionBitcasts pass
Dan Gohman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 20 13:34:18 PDT 2018
sunfish added a comment.
Ah, that's useful context, thanks. That'd be good to mention in the commit message and/or comments somewhere. Also, please add a testcase which approximates that use case.
`getCastOpcode` asserts if you ask it for something invalid. However, what about an approach like this:
- Handle the case of a pointer-to-pointer bitcast, or vector-to-vector bitcast, that we know will always be an actual no-op, and users could maybe expect that to work.
- Convert any other case to a call to `@abort`.
That way it'll still compile, so if I understand correctly, the CMake test will still work. Anything that actually aborts would be well into undefined behavior territory. And, this avoids our having to support the general case of non-trivial casts over the long term. Thoughts?
Repository:
rL LLVM
https://reviews.llvm.org/D49517
More information about the llvm-commits
mailing list