[Bug target/91652] -march=skylake-avx512 -mno-fma -O2 generates FMA instructions
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91652 Jakub Jelinek changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|--- |INVALID --- Comment #3 from Jakub Jelinek --- I don't believe this is a bug. If you look up the Intel CPU manuals, the FMA CPUID Feature Flag guards the VEX encoded VF{,N}M{ADD,SUB,ADDSUB}{132,213,231}{S,P}{S,D} instructions, but not the EVEX encoded ones, those are guarded just by AVX512F or AVX512F and AVX512VL CPUID Feature Flags. Thus, -mno-fma shouldn't affect them, -mno-avx512f should. And you can use -ffp-contract= to decide if code that isn't already using explicit fma should be converted to FMA or not if the instructions are available.
[Bug target/91652] -march=skylake-avx512 -mno-fma -O2 generates FMA instructions
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91652 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org --- Comment #2 from Jakub Jelinek --- If you don't want fma matched for code that originally didn't have it, perhaps better use -ffp-contract=off ?
[Bug target/91652] -march=skylake-avx512 -mno-fma -O2 generates FMA instructions
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91652 H.J. Lu changed: What|Removed |Added CC||hjl.tools at gmail dot com --- Comment #1 from H.J. Lu --- VEX FMA is enabled by -mfma and EVEX FMA is enabled by -mavx512f. -mno-fma disables VEX FMA, but not EVEX FMA. Adding -mno-avx512f disables EVEX FMA.