[PATCH] Move VFP4 predicate inside UseFusedMAC

Daniel Stewart stewartd at codeaurora.org
Wed Dec 4 07:47:19 PST 2013


Hi Tim,
	If UseFusedMAC is modified as

// Do not use them for Darwin platforms.
 def UseFusedMAC      : Predicate<"(TM.Options.AllowFPOpFusion =="
-                                 " FPOpFusion::Fast) && "
+                                 " FPOpFusion::Fast && "
+                                 " Subtarget->hasVFP4()) && "

to require Subtarget->hasVFP4(), then UseFusedMAC will only be true if VFP4
is available, correct?

Daniel

-----Original Message-----
From: Tim Northover [mailto:t.p.northover at gmail.com] 
Sent: Wednesday, December 04, 2013 10:42 AM
To: Daniel Stewart
Cc: llvm-commits
Subject: Re: [PATCH] Move VFP4 predicate inside UseFusedMAC

Hi Daniel,

 def  VFMAfd   : N3VDMulOp<0, 0, 0b00, 0b1100, 1, IIC_VFMACD, "vfma", "f32",
                           v2f32, fmul_su, fadd_mlx>,
-                Requires<[HasNEON,HasVFP4,UseFusedMAC]>;
+                Requires<[HasNEON,UseFusedMAC]>;

Doesn't this change mean the assembler will permit vfma even when VFP4 isn't
available? In general you can probably simplify the Pat instances, but might
have to be more careful on the instructions.

Cheers.

Tim.




More information about the llvm-commits mailing list