This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Expansion of narrowing math built-ins into power instructions
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Segher Boessenkool <segher at kernel dot crashing dot org>
- Cc: Tejas Joshi <tejasjoshi9673 at gmail dot com>, <gcc at gcc dot gnu dot org>, Martin Jambor <mjambor at suse dot cz>, <hubicka at ucw dot cz>
- Date: Mon, 12 Aug 2019 21:20:18 +0000
- Subject: Re: Expansion of narrowing math built-ins into power instructions
- Ironport-sdr: IVSZztNbOkvgzMgw4tMA75XoCvAgbdhHwSFeVBSMP9CxruOS0oDb+OssPUdZc4puC/2BKrcFwy HLcsRYUw4opaAxEcz2+923QjZlHcNzaqlIRpg4eV4ybumNrHgQmsIazP8ap9Ct0GnXQRafsuDb 1PAtXFjI2DZ3FpexqRttp3aWaqdkpyt/KRn+gkXthdCAtEakos5B/gUn00hKx8xOThFIxymAc2 K7U1ZcGBa6RehREM41iV+2vP7L9J+uHwmKyXs2BW94vGug1vqjSJ5ECvht8VScvDgI4IECRBvQ lGc=
- Ironport-sdr: jib2a8APHYuWn1kZ5TG/NNH6kYz1FxMIhmkw6jdpgm8c9lZo7/yCqt3j0HKyc9HW+RmyN9YQ64 hyXBhq7jcq1imcKdk+t04Gme5QJNKpKERqO7SIchbyhOuefSLdtcJv0eA7cIoAECtUnYcVIaaD xvBqIK4JeOvZE6ju0EkcOd6XwhADGBl/sE28NplhHQF1I+msdhi+eQ3ytfVCZE5NI9kmzA34Hr 4k3jloSYAwktEt4quO1aAT475QPFdVkiUwlhrThPpRYk4PQq5sLXCM/KsHc1fAbfhwq3lC7ghc k5o=
- References: <87sgqnx4i6.fsf@oldenburg2.str.redhat.com> <alpine.DEB.2.21.1907301947090.10734@digraph.polyomino.org.uk> <CACMrGjBiEMp7jj=b30MQ-8SMYoPA_4BFTdQRQSbV7WkYmv+Opg@mail.gmail.com> <20190731144722.GS31406@gate.crashing.org> <CACMrGjC5T-BNowawG9WiKi-C6FRMrtNKnkUSsn1TVT3iFN-Zdg@mail.gmail.com> <20190808200514.GL31406@gate.crashing.org> <alpine.DEB.2.21.1908082304570.5719@digraph.polyomino.org.uk> <CACMrGjB1UmfKuTCwGLi5oTapr4EM-JxbfVGr_GvwucWwfg0oYg@mail.gmail.com> <20190811165916.GX31406@gate.crashing.org> <CACMrGjAPa21OJ_ry+1HPyEQQbZhGOkQTVXwe=CvHsufc_ms_CQ@mail.gmail.com> <20190812175450.GB31406@gate.crashing.org>
On Mon, 12 Aug 2019, Segher Boessenkool wrote:
> (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"))))]
That sort of pattern is incorrect for a fused operation such as fadd,
because combine could match it for code that is supposed to do separate
addition and narrowing conversion. The RTL needs to be something that
does *not* match the combination of separate operations (just as fma has
its own RTL, and a separate pass is responsible for converting separate
operations to fused ones in the -ffp-contract=fast case where it's
permitted).
--
Joseph S. Myers
joseph@codesourcery.com