This is an archive of the discontinued LLVM Phabricator instance.

[X86] Honor command line features along with cpu_specific attribute
ClosedPublic

Authored by craig.topper on Nov 10 2021, 10:08 PM.

Details

Summary

If the feature is on the command line we should honor it for all
functions. I don't think we could reliably target a single function
for a less capable processor than what the rest of the program is
compiled for.

Fixes PR52407.

Diff Detail

Event Timeline

craig.topper requested review of this revision.Nov 10 2021, 10:08 PM
craig.topper created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptNov 10 2021, 10:08 PM
erichkeane accepted this revision.Nov 11 2021, 6:05 AM

Is there a lit-test that could be added to make sure this happens? We put this in an llvm-attribute, so it should be checkable.

This revision is now accepted and ready to land.Nov 11 2021, 6:05 AM

Is there a lit-test that could be added to make sure this happens? We put this in an llvm-attribute, so it should be checkable.

Forgot to git add the file I wrote.

Add test file

erichkeane accepted this revision.Nov 11 2021, 8:28 AM