LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 50781 - [X86] __tune_* defines don't follow -mtune
Summary: [X86] __tune_* defines don't follow -mtune
Status: NEW
Alias: None
Product: libraries
Classification: Unclassified
Component: Backend: X86 (show other bugs)
Version: trunk
Hardware: PC All
: P enhancement
Assignee: Unassigned LLVM Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-06-20 19:21 PDT by Craig Topper
Modified: 2021-06-20 22:40 PDT (History)
5 users (show)

See Also:
Fixed By Commit(s):


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Craig Topper 2021-06-20 19:21:02 PDT
Note this is really a clang bug, but there's no good component for target specific clang code and this component has the right CC list.

When I implemented -mtune support, I failed to make the preprocessor defines follow the -mtune setting.

This probably means we need a setTuneCPU function like setCPU in TargetInfo. Then we need to split defineCPUMacros to remove the tuning define. I think other targets use defineCPUMacros, but set a bool to not define the tune defines so removing the code simplies the interface.

I probably won't have a chance to work on this for a while. Pengfei, can you or someone at Intel handle it?
Comment 1 Phoebe Wang 2021-06-20 22:40:44 PDT
Sure, I can do it.