diff mbox

[i386] Do not disable fma4 for TARGET_FMA

Message ID CAFULd4Z3isyqqpZ-c0BmKMGss-2Ceg09COL3243iADVnWUUvSA@mail.gmail.com
State New
Headers show

Commit Message

Uros Bizjak Jan. 21, 2013, 10:38 a.m. UTC
On Mon, Jan 21, 2013 at 10:28 AM, Ekanathan, Saravanan
<Saravanan.Ekanathan@amd.com> wrote:

2012-01-21  Uros Bizjak  <ubizjak@gmail.com>

	* config/i386/i386.md (enabled): Do not disable fma4 for TARGET_FMA.

Bootstrapped and regression tested on x86_64-pc-linux-gnu, also tested by AMD:

> Hi Uros,
> With your patch on bdver2, CPU2006 and polyhedron generated good instruction mix of FMA and FMA4 instructions.
> The % improvement(Geomean difference for scores/runtime)  for both benchmarks with the patch is negligible though.
> Please go ahead and check in the patch.

Committed to mainline SVN.

Uros.
diff mbox

Patch

Index: config/i386/i386.md
===================================================================
--- config/i386/i386.md	(revision 195330)
+++ config/i386/i386.md	(working copy)
@@ -665,14 +665,8 @@ 
 	 (eq_attr "isa" "avx2") (symbol_ref "TARGET_AVX2")
 	 (eq_attr "isa" "noavx2") (symbol_ref "!TARGET_AVX2")
 	 (eq_attr "isa" "bmi2") (symbol_ref "TARGET_BMI2")
+	 (eq_attr "isa" "fma4") (symbol_ref "TARGET_FMA4")
 	 (eq_attr "isa" "fma") (symbol_ref "TARGET_FMA")
-	 ;; Fma instruction selection has to be done based on
-	 ;; register pressure. For generating fma4, a cost model
-	 ;; based on register pressure is required. Till then,
-	 ;; fma4 instruction is disabled for targets that implement
-	 ;; both fma and fma4 instruction sets.
-	 (eq_attr "isa" "fma4")
-	   (symbol_ref "TARGET_FMA4 && !TARGET_FMA")
 	]
 	(const_int 1)))