This is the mail archive of the
mailing list for the GCC project.
Re: Expansion of narrowing math built-ins into power instructions
On Wed, 14 Aug 2019, Segher Boessenkool wrote:
> I think you can do one RTL code that replaces float_truncate in
> > > > > (define_insn "add_truncdfsf3"
> > > > > [(set (match_operand:SF 0 "gpc_reg_operand" "=f,wa")
> > > > > (float_truncate:SF
> > > > > (plus:DF (match_operand:DF 1 "gpc_reg_operand" "%d,wa")
> > > > > (match_operand:DF 2 "gpc_reg_operand" "d,wa"))))]
> but that is only meant for such explicit contraction. This can then
> happily be used to implement all such patterns. Is there some issue
> with that I overlook?
Yes, I think such a separate RTL code would work (as would an
architecture-specific UNSPEC) - it just needs to avoid the pattern
matching RTL that can arise other than from the built-in functions.
(Everything to do with needing -fno-math-errno to expand into such
instructions should be handled in the architecture-independent compiler.)
Joseph S. Myers