Patchwork [i386] Do not disable fma4 for TARGET_FMA

mail settings
Submitter Uros Bizjak
Date Jan. 21, 2013, 10:38 a.m.
Message ID <>
Download mbox | patch
Permalink /patch/214069/
State New
Headers show


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

2012-01-21  Uros Bizjak  <>

	* config/i386/ (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.



Index: config/i386/
--- config/i386/	(revision 195330)
+++ config/i386/	(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)))