]> git.ipfire.org Git - thirdparty/gcc.git/commit
i386: Sync tune_string with arch_string for target attribute arch=*
authorHongyu Wang <hongyu.wang@intel.com>
Sun, 25 Jun 2023 01:50:21 +0000 (09:50 +0800)
committerHongyu Wang <hongyu.wang@intel.com>
Mon, 26 Jun 2023 01:59:44 +0000 (09:59 +0800)
commit2916278d14e9ac28c361c396a67256acbebda6e8
tree50de0cecaa34793ccce4ba20da06c1e763f02976
parent068eba260fa362616ea82ebb37ed86eb9cc59ac6
i386: Sync tune_string with arch_string for target attribute arch=*

For function with target attribute arch=*, current logic will set its
tune to -mtune from command line so all target_clones will get same
tuning flags which would affect the performance for each clone. Override
tune with arch if tune was not explicitly specified to get proper tuning
flags for target_clones.

gcc/ChangeLog:

* config/i386/i386-options.cc (ix86_valid_target_attribute_tree):
Override tune_string with arch_string if tune_string is not
explicitly specified.

gcc/testsuite/ChangeLog:

* gcc.target/i386/mvc17.c: New test.
gcc/config/i386/i386-options.cc
gcc/testsuite/gcc.target/i386/mvc17.c [new file with mode: 0644]