public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/62286] New: [ARM] 4.9 Regression fails for cortex-m3 for vfp-1.c: fmacs, fmscs, fnmacs, fnmscs
@ 2014-08-27 15:11 kaushik.phatak at kpitcummins dot com
  2014-10-28 12:56 ` [Bug testsuite/62286] " ramana at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: kaushik.phatak at kpitcummins dot com @ 2014-08-27 15:11 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62286

            Bug ID: 62286
           Summary: [ARM] 4.9 Regression fails for cortex-m3 for vfp-1.c:
                    fmacs, fmscs, fnmacs, fnmscs
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: kaushik.phatak at kpitcummins dot com

Results are as below:
FAIL: gcc.target/arm/vfp-1.c scan-assembler fmacs
FAIL: gcc.target/arm/vfp-1.c scan-assembler fmscs
FAIL: gcc.target/arm/vfp-1.c scan-assembler fnmacs
FAIL: gcc.target/arm/vfp-1.c scan-assembler fnmscs

It passes for -mcpu=cortex-a9, -mcpu=cortex-r4f which were tested.

Expected Result:
  /* { dg-final { scan-assembler "fmacs" } } */
/src/gcc-4.9.1/gcc/testsuite/gcc.target/arm/vfp-1.c ****   f1 = f2 * f3 + f1;
  73                            .loc 1 36 0
     flds    s13, [r2]
     flds    s14, [r3]
     flds    s15, [r4]
     fmacs   s15, s13, s14
     fsts    s15, [r4]

Actual Result, uses fmuls and fadds:
     flds    s13, [r2]
     flds    s14, [r3]
     flds    s15, [r4]
     fmuls   s15, s14, s15
     fadds   s15, s15, s13
     fsts    s15, [r4]


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug testsuite/62286] [ARM] 4.9 Regression fails for cortex-m3 for vfp-1.c: fmacs, fmscs, fnmacs, fnmscs
  2014-08-27 15:11 [Bug c/62286] New: [ARM] 4.9 Regression fails for cortex-m3 for vfp-1.c: fmacs, fmscs, fnmacs, fnmscs kaushik.phatak at kpitcummins dot com
@ 2014-10-28 12:56 ` ramana at gcc dot gnu.org
  2015-01-23 13:46 ` ktkachov at gcc dot gnu.org
  2015-01-23 14:23 ` ktkachov at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: ramana at gcc dot gnu.org @ 2014-10-28 12:56 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62286

Ramana Radhakrishnan <ramana at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2014-10-28
                 CC|                            |ramana at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #1 from Ramana Radhakrishnan <ramana at gcc dot gnu.org> ---
Because the Cortex-M3 doesn't have those instructions ? It's a testism probably
fixed by an appropriate dg-options values.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug testsuite/62286] [ARM] 4.9 Regression fails for cortex-m3 for vfp-1.c: fmacs, fmscs, fnmacs, fnmscs
  2014-08-27 15:11 [Bug c/62286] New: [ARM] 4.9 Regression fails for cortex-m3 for vfp-1.c: fmacs, fmscs, fnmacs, fnmscs kaushik.phatak at kpitcummins dot com
  2014-10-28 12:56 ` [Bug testsuite/62286] " ramana at gcc dot gnu.org
@ 2015-01-23 13:46 ` ktkachov at gcc dot gnu.org
  2015-01-23 14:23 ` ktkachov at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: ktkachov at gcc dot gnu.org @ 2015-01-23 13:46 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62286

ktkachov at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ktkachov at gcc dot gnu.org,
                   |                            |terry.guo at arm dot com

--- Comment #2 from ktkachov at gcc dot gnu.org ---
(In reply to Ramana Radhakrishnan from comment #1)
> Because the Cortex-M3 doesn't have those instructions ? It's a testism
> probably fixed by an appropriate dg-options values.

It's not a testism, it's a costs issue.
The FP instructions are dictated by the -mfpu option that is given (-mfpu=vfp
is hardcoded in the dg-options here) and in any case Cortex-M3 should support
the vmla instructions as far as I know.
The RTX costs during combine reject the combination of

         vnmul.f32       s15, s14, s15
         vsub.f32        s15, s15, s13

into 
         vnmla.f32       s15, s13, s14

for example.
In particular I think it's the mult_addsub cost. A relevant combine log part
is:
Trying 57 -> 58:
Successfully matched this instruction:
(set (reg:SF 134 [ D.4322 ])
    (plus:SF (mult:SF (reg:SF 130 [ D.4322 ])
            (reg:SF 131 [ D.4322 ]))
        (reg:SF 133 [ D.4322 ])))
(plus:SF (mult:SF (reg:SF 130 [ D.4322 ])
        (reg:SF 131 [ D.4322 ]))
    (reg:SF 133 [ D.4322 ]))

Hot cost: 24 (final)
rejecting combination of insns 57 and 58
original costs 12 + 8 = 20
replacement cost 24

Is it actually beneficial for Cortex-M3 to split this up?


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug testsuite/62286] [ARM] 4.9 Regression fails for cortex-m3 for vfp-1.c: fmacs, fmscs, fnmacs, fnmscs
  2014-08-27 15:11 [Bug c/62286] New: [ARM] 4.9 Regression fails for cortex-m3 for vfp-1.c: fmacs, fmscs, fnmacs, fnmscs kaushik.phatak at kpitcummins dot com
  2014-10-28 12:56 ` [Bug testsuite/62286] " ramana at gcc dot gnu.org
  2015-01-23 13:46 ` ktkachov at gcc dot gnu.org
@ 2015-01-23 14:23 ` ktkachov at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: ktkachov at gcc dot gnu.org @ 2015-01-23 14:23 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62286

ktkachov at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |INVALID

--- Comment #4 from ktkachov at gcc dot gnu.org ---
Ok, closing this off then as this doesn't affect any real configurations, only
a theoretical combination of cpu and fpu


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-01-23 14:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-27 15:11 [Bug c/62286] New: [ARM] 4.9 Regression fails for cortex-m3 for vfp-1.c: fmacs, fmscs, fnmacs, fnmscs kaushik.phatak at kpitcummins dot com
2014-10-28 12:56 ` [Bug testsuite/62286] " ramana at gcc dot gnu.org
2015-01-23 13:46 ` ktkachov at gcc dot gnu.org
2015-01-23 14:23 ` ktkachov at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).