This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Expansion of narrowing math built-ins into power instructions


On Fri, Aug 23, 2019 at 07:16:59PM +0200, Martin Jambor wrote:
> Therefore, at least for now (GSoC deadline is kind of looming), I
> decided that the best way forward would be to not rely on internal
> functions but plug into expand_builtin() and I wrote the following,
> lightly tested patch - which of course misses testcases and stuff - but
> I'd be curious about any feedback now anyway.  When I proposed a very
> similar approach for the roundeven x86_64 expansion, Uros actually then
> opted for a solution based on internal functions, so I am curious
> whether there are simple alternatives I do not see.
> Tejas, of course cases for other fadd variants should at least be added
> to expand_builtin.

Looks good for the rs6000 part, thanks!  Some trivialities:

> 	* builtins.c (expand_builtin_binary_conversion): New function.
> 	  (expand_builtin): Call it.

(Wrong indentation, should be just one tab, no extra spaces).

> +(define_insn "add_truncdfsf3"
> +  [(set (match_operand:SF 0 "gpc_reg_operand" "=f,wa")
> +	(unspec:SF [(match_operand:DF 1 "gpc_reg_operand" "%d,wa")
> +		    (match_operand:DF 2 "gpc_reg_operand" "d,wa")]

Please align the U with the preceding [.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]