If -mavx implies -mxsave, then -mno-xsave should imply -mno-avx.
authorliuhongt <hongtao.liu@intel.com>
Wed, 16 Sep 2020 05:56:30 +0000 (13:56 +0800)
committerliuhongt <hongtao.liu@intel.com>
Thu, 17 Sep 2020 04:59:35 +0000 (12:59 +0800)
commita8c4b66a41fa805757f5943bd41690243365bccd
treed4c8f331c87574822c1a3806c3969541ed2b63ab
parentecde1b0a467127714872785b9935fe7c580778f0
If -mavx implies -mxsave, then -mno-xsave should imply -mno-avx.

Current status is -mno-avx implies -mno-xsave which should be wrong.

gcc/ChangeLog

* common/config/i386/i386-common.c
(OPTION_MASK_ISA_AVX_UNSET): Remove OPTION_MASK_ISA_XSAVE_UNSET.
(OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_AVX_UNSET.

gcc/testsuite/ChangeLog

* gcc.target/i386/xsave-avx-1.c: New test.
gcc/common/config/i386/i386-common.c
gcc/testsuite/gcc.target/i386/xsave-avx-1.c [new file with mode: 0644]