This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/63408] [4.8 regression] GCC emits incorrect FMA instruction on Cortex-M4 target
- From: "rearnsha at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 30 Sep 2014 10:21:20 +0000
- Subject: [Bug target/63408] [4.8 regression] GCC emits incorrect FMA instruction on Cortex-M4 target
- Auto-submitted: auto-generated
- References: <bug-63408-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63408
Richard Earnshaw <rearnsha at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2014-09-30
CC| |ramana at gcc dot gnu.org
Summary|GCC emits incorrect FMA |[4.8 regression] GCC emits
|instruction on Cortex-M4 |incorrect FMA instruction
|target |on Cortex-M4 target
Ever confirmed|0 |1
--- Comment #3 from Richard Earnshaw <rearnsha at gcc dot gnu.org> ---
Confirmed. The compiler thinks (incorrectly) that the conversion of b to float
can be merged with the negation by using the fixed-to-float conversion
operation in the back-end. That is, it thinks
(insn 10 9 11 2 (set (reg:SF 121 [ D.4093 ])
(mult:SF (float:SF (reg:SI 0 r0 [ b ]))
(const_double:SF -4.656612873077392578125e-10 [-0x0.8p-30])))
is a legitimate instruction.
vfp3_const_double_for_fract_bits() needs to be made aware that negative values
cannot be used in this context.
This is almost certainly a regression since the pattern was added.