This is an archive of the discontinued LLVM Phabricator instance.

[AArch64][FMV] Prevent target attribute using for multiversioning.
ClosedPublic

Authored by ilinpv on May 18 2023, 6:03 AM.

Details

Summary

On AArch64 for function multiversioning target_version/target_clones attributes should be used. The patch fixes the defect allowing target attribute to cause multiversioning.

Diff Detail

Event Timeline

ilinpv created this revision.May 18 2023, 6:03 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 18 2023, 6:03 AM
ilinpv requested review of this revision.May 18 2023, 6:03 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 18 2023, 6:04 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
This revision is now accepted and ready to land.May 23 2023, 2:56 AM
Allen added a subscriber: Allen.Sep 6 2023, 1:58 AM
Allen added inline comments.
clang/lib/Sema/SemaDecl.cpp
11544

I find the attribute target_clones/target_version also not be used to generate multiversioning function? https://godbolt.org/z/cYWsbrPn9
so it is not support on AArch64 ?

ilinpv added inline comments.Sep 6 2023, 3:39 AM
clang/lib/Sema/SemaDecl.cpp
11544

Function multiversioning depends on compiler-rt library, specify --rtlib=compiler-rt to make it work.