Issue 98272
Summary X86: Delete MMX types/intrinsics from LLVM IR/backends
Labels backend:X86
Assignees
Reporter jyknight
    This issue is about removing IR and SelectionDAG/Codegen support. Assembler support should remain.

Previous discussion on discourse [Proposal to remove MMX support](https://discourse.llvm.org/t/proposal-to-remove-mmx-support/56304)

The idea is, at the LLVM level, to keep only minimal support for the inlineasm "y" constraints, and remove as much of the rest as possible.

Overall plan:
1. Delete all support for 3dNow! (PR #96246)
2. Delete the `x86_mmx` type from IR. Can be done by using (at the IR level only) a standard vector type, `<1 x i64>`, instead. Notably, Clang already uses `<1 x i64>` for everything except where required to interface with mmx intrinsics and inline-asm. The conversion for those interfaces can be pushed down into SelectionDAG instead. (PR for this pending)
3. Migrate Clang-side MMX builtins to be backed by SSE2 instead of MMX (bug #41665, PR #96540), so they can continue to work without requiring the MMX intrinsic functions in IR (and as a bonus, they'll likely get faster, too).
4. Delete the IR-side MMX intrinsic functions.
   - Open question: how to deal with bitcode backwards compatibility for these? Maybe simplest to convert the intrinsics to inline-asm in autoupgrade.
5. Delete as much of the remaining X86 backend code related to MMX as possible, without breaking inline asm "y" constraints.
6. Decide whether to do anything about inserting EMMS instructions (bug #41664). At this point, it'd be only relevant to inline-asm. So we could potentially insert such an instruction directly after all inline-asm which have MMX register inputs/outputs/clobbers. Or we could also (continue to) not bother.

@efriedma-quic @phoebewang @topperc @RKSimon
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to