This is an archive of the discontinued LLVM Phabricator instance.

[X86] Use generic tuning for "x86-64" if "tune-cpu" is not specified
ClosedPublic

Authored by pengfei on Jul 13 2022, 8:03 AM.

Diff Detail

Event Timeline

pengfei created this revision.Jul 13 2022, 8:03 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 13 2022, 8:03 AM
pengfei requested review of this revision.Jul 13 2022, 8:03 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 13 2022, 8:03 AM

This comment in X86.td is wrong now

// NOTE: As a default tuning, "generic" aims to produce code optimized for the   
// most common X86 processors. The tunings might be changed over time. It is     
// recommended to use "x86-64" in lit tests for consistency.
llvm/lib/Target/X86/X86TargetMachine.cpp
257–262

Probably worth a comment here

This patch will make my proposed change in D129154 unnecessary, but can you copy the sqrt-fastmath-tunecpu-attr.ll (with a change to the @f32_tune_x86_64 test to reflect the current tuning when "tune-cpu"="x86-64" is used)?

pengfei updated this revision to Diff 444528.Jul 13 2022, 11:33 PM
pengfei marked an inline comment as done.

Address comments form Craig and Andy. Thanks!

This revision is now accepted and ready to land.Jul 14 2022, 10:27 AM

Thanks Craig!

This revision was landed with ongoing or failed builds.Jul 14 2022, 7:05 PM
This revision was automatically updated to reflect the committed changes.