aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorGanesh Gopalasubramanian <Ganesh.Gopalasubramanian@amd.com>2012-05-03 07:34:25 +0000
committerVenkataramanan Kumar <vekumar@gcc.gnu.org>2012-05-03 07:34:25 +0000
commitd130f146484b854b059a2ec226dee531069a001d (patch)
tree634792f465bf5422c15e1a7b4df109c92817084a /gcc
parentbcb4ad361cdc348f19f290bdb172853cbc50859d (diff)
downloadgcc-d130f146484b854b059a2ec226dee531069a001d.zip
gcc-d130f146484b854b059a2ec226dee531069a001d.tar.gz
gcc-d130f146484b854b059a2ec226dee531069a001d.tar.bz2
With -march=native generate fma3 instruction by default for AMD processors which support both fma and fma4
From-SVN: r187077
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/i386/driver-i386.c2
2 files changed, 7 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 97ce580..6c8132f 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2012-05-03 Ganesh Gopalasubramanian <Ganesh.Gopalasubramanian@amd.com>
+
+ * config/i386/driver-i386.c (host_detect_local_cpu): Reset
+ has_fma4 for AMD processors with both fma3 and fma4 support.
+
2012-05-03 Kirill Yukhin <kirill.yukhin@intel.com>
PR target/53201
diff --git a/gcc/config/i386/driver-i386.c b/gcc/config/i386/driver-i386.c
index e452ba5..8fe7ab8 100644
--- a/gcc/config/i386/driver-i386.c
+++ b/gcc/config/i386/driver-i386.c
@@ -474,6 +474,8 @@ const char *host_detect_local_cpu (int argc, const char **argv)
has_abm = ecx & bit_ABM;
has_lwp = ecx & bit_LWP;
has_fma4 = ecx & bit_FMA4;
+ if (vendor == SIG_AMD && has_fma4 && has_fma)
+ has_fma4 = 0;
has_xop = ecx & bit_XOP;
has_tbm = ecx & bit_TBM;
has_lzcnt = ecx & bit_LZCNT;