public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/63963] New: [5 Regression] LTO doesn't work with __attribute__((__target__("sse4.2")))
@ 2014-11-19 13:47 hjl.tools at gmail dot com
  2014-11-19 14:24 ` [Bug lto/63963] " rguenth at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: hjl.tools at gmail dot com @ 2014-11-19 13:47 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 63963
           Summary: [5 Regression] LTO doesn't work with
                    __attribute__((__target__("sse4.2")))
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: lto
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hjl.tools at gmail dot com

On Linux/x86-64, r217664 gave

extern const uchar * search_line_sse42 (const uchar *s, const uchar *end);
int
main (int argc, char **argv)
{
  return search_line_sse42 (argv[0], argv[0]) != 0;
}
[hjl@gnu-6 gcc]$ cat /tmp/lex.c 
#include <stdint.h>
#include <x86intrin.h>

typedef unsigned char uchar;

const uchar *
__attribute__((__target__("sse4.2")))
search_line_sse42 (const uchar *s, const uchar *end)
{
  typedef char v16qi __attribute__ ((__vector_size__ (16)));
  static const v16qi search = { '\n', '\r', '?', '\\' };
  uintptr_t si = (uintptr_t)s;
  uintptr_t index;
  v16qi sv;
  sv = __builtin_ia32_loaddqu ((const char *) s);
  index = __builtin_ia32_pcmpestri128 (search, 4, sv, 16, 0);
  return s + index;
}
[hjl@gnu-6 gcc]$ ./xgcc -B./ -O2 -flto -c /tmp/x.c
[hjl@gnu-6 gcc]$ ./xgcc -B./ -O2 -flto x.o lex.o    
/tmp/lex.c: In function \u2018main\u2019:
/tmp/lex.c:16:11: error: \u2018__builtin_ia32_pcmpestri128\u2019 needs isa
option -m32 -msse4.2
   index = __builtin_ia32_pcmpestri128 (search, 4, sv, 16, 0);
           ^
lto-wrapper: fatal error: ./xgcc returned 1 exit status
compilation terminated.
/usr/local/bin/ld: lto-wrapper failed
collect2: error: ld returned 1 exit status
[hjl@gnu-6 gcc]$


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

end of thread, other threads:[~2014-11-20 22:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-19 13:47 [Bug lto/63963] New: [5 Regression] LTO doesn't work with __attribute__((__target__("sse4.2"))) hjl.tools at gmail dot com
2014-11-19 14:24 ` [Bug lto/63963] " rguenth at gcc dot gnu.org
2014-11-19 20:36 ` hubicka at gcc dot gnu.org
2014-11-20 22:28 ` hubicka 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).