Open Quuxplusone opened 5 years ago
(In reply to Simon Pilgrim from comment #0)
> NOTE: This will cause a high number of subvector insertions/extractions, we
> might need some mechanism to reduce this even without optimizations.
If we switch to widening 64-bit vectors by default, instead of promoting them,
the conversions would be free, so it wouldn't really matter. Otherwise, yes,
this could get messy; we might need special "fake-MMX" intrinsics.
Being implemented with:
- https://reviews.llvm.org/D86855:
Convert __m64 intrinsics to unconditionally use SSE2 instead of MMX instructions
- https://reviews.llvm.org/D94213:
Clang: Remove support for 3DNow!, both intrinsics and builtins.
- https://reviews.llvm.org/D94252:
Delete (most) of the MMX builtin functions from Clang.
Similar to what's been proposed recently for gcc, we should investigate promoting MMX intrinsics to SSE equivalents:
https://gcc.gnu.org/ml/gcc-patches/2019-02/msg00061.html
This probably would be best handled in CGBuiltin.cpp - replacing the MMX builtins with SSE equivalents, although some can probably done in headers as well behind a suitable define.
NOTE: This will cause a high number of subvector insertions/extractions, we might need some mechanism to reduce this even without optimizations.