public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/57202] New: Please make the intrinsics headers like immintrin.h be usable without compiler flags
@ 2013-05-08  4:28 thiago at kde dot org
  2013-05-08  7:03 ` [Bug target/57202] " thiago at kde dot org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: thiago at kde dot org @ 2013-05-08  4:28 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 57202
           Summary: Please make the intrinsics headers like immintrin.h be
                    usable without compiler flags
    Classification: Unclassified
           Product: gcc
           Version: 4.8.1
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: other
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: thiago@kde.org


Please make all headers for intrinsics be includable without special compiler
flags.

In other words, I want the following to work:

$ gcc -fsyntax-only -include smmintrin.h -xc /dev/null
In file included from <command-line>:0:0:
/usr/lib/gcc/x86_64-redhat-linux/4.7.2/include/smmintrin.h:31:3: error: #error
"SSE4.1 instruction set not enabled"

Note it works with ICC:
$ icc -fsyntax-only -include smmintrin.h -xc /dev/null && echo works
works


Not only that, please make all the intrinsics functions be defined and ready to
be used.

This is necessary so that the following source file could compile even if
-msse4.1 is not passed on the command-line (adapted from
http://gcc.gnu.org/gcc-4.8/changes.html):

#include <smmintrin.h>

 __attribute__ ((target ("default")))
int foo(void)
{
  return 1;
}

__attribute__ ((target ("sse4.2")))
int foo(void)
{
  __m128i v;
  _mm_blendv_epi8(v, v, v);
  return 2;
}

There are several reasons for that, number one among them that it makes the GCC
4.8 feature above actually useful for non-trivial code. Also, passing extra
options on the command-line are simply not an option for C++ code (where the
feature above is useful) if that code is moderately complex and uses inline
functions, and those options cannot be used if LTO is to be used (bug 54231).


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

* [Bug target/57202] Please make the intrinsics headers like immintrin.h be usable without compiler flags
  2013-05-08  4:28 [Bug other/57202] New: Please make the intrinsics headers like immintrin.h be usable without compiler flags thiago at kde dot org
@ 2013-05-08  7:03 ` thiago at kde dot org
  2013-05-08  7:36 ` pinskia at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: thiago at kde dot org @ 2013-05-08  7:03 UTC (permalink / raw)
  To: gcc-bugs


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

Thiago Macieira <thiago at kde dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|x86_64-*-* i?86-*-*         |x86_64-*-* i?86-*-* arm-*-*

--- Comment #1 from Thiago Macieira <thiago at kde dot org> 2013-05-08 07:03:26 UTC ---
This also applies to arm_neon.h.


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

* [Bug target/57202] Please make the intrinsics headers like immintrin.h be usable without compiler flags
  2013-05-08  4:28 [Bug other/57202] New: Please make the intrinsics headers like immintrin.h be usable without compiler flags thiago at kde dot org
  2013-05-08  7:03 ` [Bug target/57202] " thiago at kde dot org
@ 2013-05-08  7:36 ` pinskia at gcc dot gnu.org
  2014-02-12 15:24 ` thiago at kde dot org
  2014-02-12 15:45 ` glisse at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2013-05-08  7:36 UTC (permalink / raw)
  To: gcc-bugs


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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|x86_64-*-* i?86-*-* arm-*-* |x86_64-*-* i?86-*-*

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> 2013-05-08 07:35:52 UTC ---
(In reply to comment #1)
> This also applies to arm_neon.h.

Please file a bug separate for arm.


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

* [Bug target/57202] Please make the intrinsics headers like immintrin.h be usable without compiler flags
  2013-05-08  4:28 [Bug other/57202] New: Please make the intrinsics headers like immintrin.h be usable without compiler flags thiago at kde dot org
  2013-05-08  7:03 ` [Bug target/57202] " thiago at kde dot org
  2013-05-08  7:36 ` pinskia at gcc dot gnu.org
@ 2014-02-12 15:24 ` thiago at kde dot org
  2014-02-12 15:45 ` glisse at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: thiago at kde dot org @ 2014-02-12 15:24 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Thiago Macieira <thiago at kde dot org> ---
(In reply to Marc Glisse from comment #4)
> Can this be closed?

Oh, yeah, this is working fine in GCC 4.9.


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

* [Bug target/57202] Please make the intrinsics headers like immintrin.h be usable without compiler flags
  2013-05-08  4:28 [Bug other/57202] New: Please make the intrinsics headers like immintrin.h be usable without compiler flags thiago at kde dot org
                   ` (2 preceding siblings ...)
  2014-02-12 15:24 ` thiago at kde dot org
@ 2014-02-12 15:45 ` glisse at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: glisse at gcc dot gnu.org @ 2014-02-12 15:45 UTC (permalink / raw)
  To: gcc-bugs

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

Marc Glisse <glisse at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
      Known to work|                            |4.9.0
         Resolution|---                         |FIXED
   Target Milestone|---                         |4.9.0

--- Comment #6 from Marc Glisse <glisse at gcc dot gnu.org> ---
Thanks.


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

end of thread, other threads:[~2014-02-12 15:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-08  4:28 [Bug other/57202] New: Please make the intrinsics headers like immintrin.h be usable without compiler flags thiago at kde dot org
2013-05-08  7:03 ` [Bug target/57202] " thiago at kde dot org
2013-05-08  7:36 ` pinskia at gcc dot gnu.org
2014-02-12 15:24 ` thiago at kde dot org
2014-02-12 15:45 ` 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).