public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "hjl.tools at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug lto/63963] New: [5 Regression] LTO doesn't work with __attribute__((__target__("sse4.2")))
Date: Wed, 19 Nov 2014 13:47:00 -0000	[thread overview]
Message-ID: <bug-63963-4@http.gcc.gnu.org/bugzilla/> (raw)

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]$


             reply	other threads:[~2014-11-19 13:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-19 13:47 hjl.tools at gmail dot com [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-63963-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).