This is an archive of the discontinued LLVM Phabricator instance.

Clang: Remove support for 3DNow!, both intrinsics and builtins.
Needs ReviewPublic

Authored by jyknight on Jan 6 2021, 8:37 PM.

Details

Summary

This set of instructions was only supported by AMD chips starting in
the K6-2 (introduced 1998), and before the "Bulldozer" family
(2011). They were never much used, as they were effectively superseded
by the more-widely-implemented SSE (first implemented on the AMD side
in Athlon XP in 2001).

As part of the general removal of MMX register usage
(https://reviews.llvm.org/D86855), something also needs to be done
with the 3dnow intrinsics. Since there is almost no usage of these,
and no hardware implements them, simple removal of both the intrinsics
and the corresponding __3dNOW__ feature define seems like the best
option.

Support for the underlying LLVM intrinsics remains unchanged, at least
for the moment, although it quite likely makes sense to remove support
on the LLVM side as well.

Diff Detail

Event Timeline

jyknight created this revision.Jan 6 2021, 8:37 PM
jyknight requested review of this revision.Jan 6 2021, 8:37 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptJan 6 2021, 8:37 PM

This all needs properly documenting in the release notes, and possibly in the clang docs as well explaining that mmx/3dnow is supported only inside assembly,

Are we likely to get all of the 3dnow and mmx changes done before the 12.00 branch? Otherwise I'm tempted to suggest we delay this until just after the branch is made and we target (and document) it all for 13.00.

Agreed w.r.t. timing -- I would like to get all of these changes landed soon after the LLVM 12 branch-cut, to allow plenty time to stew on the main branch before they make it into a release to try to identify any issues.

I'd still appreciate review and approval with the proviso that it not land yet, however.

Ping.

Hi @jyknight - sorry for going quiet - 12.xx has brewed long enough that I think we can start looking at this again in trunk - I'll take a look in the next day or so.

clang/lib/Headers/x86intrin.h