public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/56253] New: fp-contract does not work with SSE and AVX FMAs (neither FMA4 nor FMA3)
@ 2013-02-08 12:15 kretz at kde dot org
  2013-02-08 12:39 ` [Bug target/56253] " rguenth at gcc dot gnu.org
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: kretz at kde dot org @ 2013-02-08 12:15 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56253

             Bug #: 56253
           Summary: fp-contract does not work with SSE and AVX FMAs
                    (neither FMA4 nor FMA3)
    Classification: Unclassified
           Product: gcc
           Version: 4.7.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: kretz@kde.org


Take the following testcase:

#include <immintrin.h>
__m256 foo(__m256 a, __m256 b, __m256 c)
{  
    return _mm256_add_ps(_mm256_mul_ps(a, b), c);
}
__m128 foo(__m128 a, __m128 b, __m128 c)
{  
    return _mm_add_ps(_mm_mul_ps(a, b), c);
}
float foo(float a, float b, float c)
{  
    return a * b + c;
}

compiled with 'g++ -O3 -mfma -ffp-contract=fast -fabi-version=0 -c' only the
third function uses fmas (same for -mfma4). The SSE and AVX variant should make
the same contraction as is implemented for scalar operations.


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

end of thread, other threads:[~2014-09-25  6:39 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-08 12:15 [Bug tree-optimization/56253] New: fp-contract does not work with SSE and AVX FMAs (neither FMA4 nor FMA3) kretz at kde dot org
2013-02-08 12:39 ` [Bug target/56253] " rguenth at gcc dot gnu.org
2013-02-08 12:53 ` rguenth at gcc dot gnu.org
2013-02-08 12:59 ` ubizjak at gmail dot com
2013-02-08 13:30 ` rguenth at gcc dot gnu.org
2013-02-08 13:43 ` rguenth at gcc dot gnu.org
2013-02-08 14:59 ` ubizjak at gmail dot com
2013-02-11 11:36 ` rguenth at gcc dot gnu.org
2014-09-23 16:40 ` agner at agner dot org
2014-09-23 19:14 ` agner at agner dot org
2014-09-23 19:22 ` glisse at gcc dot gnu.org
2014-09-24  5:14 ` agner at agner dot org
2014-09-25  6:37 ` glisse at gcc dot gnu.org
2014-09-25  6:39 ` glisse 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).