This is an archive of the discontinued LLVM Phabricator instance.

llc: Change behavior of -mcpu with existing attribute
ClosedPublic

Authored by arsenm on Dec 10 2019, 4:41 AM.

Details

Summary

Don't overwrite existing target-cpu attributes.

I've often found the replacement behavior annoying, and this is
inconsistent with how the fast math command line flags interact with
the function attributes.

Does not yet change target-features, since I think that should behave
as a concatenation.

Diff Detail

Event Timeline

arsenm created this revision.Dec 10 2019, 4:41 AM

X86 changes look good to me. I've also found the previous behavior strange.

This revision is now accepted and ready to land.Jan 6 2020, 8:53 PM