public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
To: "Martin Liška" <mliska@suse.cz>
Cc: gcc-patches@gcc.gnu.org,
	Michael Meissner <meissner@linux.vnet.ibm.com>,
	       "Dominique d'Humieres" <dominiq@lps.ens.fr>
Subject: Re: [PATCH] Fix removal of ifunc (PR ipa/81214).
Date: Mon, 03 Jul 2017 13:44:00 -0000	[thread overview]
Message-ID: <ydd4luthby7.fsf@CeBiTec.Uni-Bielefeld.DE> (raw)
In-Reply-To: <aeaac298-912a-9618-eaa4-7d082619a194@suse.cz> ("Martin =?utf-8?Q?Li=C5=A1ka=22's?=	message of "Fri, 30 Jun 2017 10:49:03 +0200")

[-- Attachment #1: Type: text/plain, Size: 2543 bytes --]

Hi Martin,

> Following patch fixes the issue where we do not emit ifunc and resolver
> for function that are not called in a compilation unit or and not
> referenced.
>
> Patch can bootstrap on ppc64le-redhat-linux and survives regression tests.
> i386.exp tests work on x86_64-linux-gnu.

your patch caused a testsuite regression on various targets:

FAIL: gcc.target/i386/mvc6.c (test for excess errors)
UNRESOLVED: gcc.target/i386/mvc6.c scan-assembler punpcklbw
UNRESOLVED: gcc.target/i386/mvc6.c scan-assembler vpshufb

Excess errors:
/vol/gcc/src/hg/trunk/local/gcc/testsuite/gcc.target/i386/mvc6.c:8:1: error: the call requires ifunc, which is not supported by this target

I'm seeing it on i386-pc-solaris2.12, Dominique reported it in the PR on
Darwin/x86, and there are also testsuite results on FreeBSD/x86.

Unlike most other __attribute__((target_clones)) tests, this one lacked
{ dg-require-ifunc "" } and didn't need it before.

The following patch fixes this.  Tested with the appropriate runtest
invocation on i386-pc-solaris2.12 and x86_64-pc-linux-gnu, installed on
mainline.

While I was at it, I checked the other testcases with
__attribute__((target_clones)):

g++.dg/ext/mvc1.C		dg-require-ifunc ""
g++.dg/ext/mvc2.C		00 (dg-warning)
g++.dg/ext/mvc3.C		00 (dg-warning)
g++.dg/ext/mvc4.C		dg-require-ifunc ""
gcc.dg/tree-prof/pr66295.c	dg-require-ifunc ""
gcc.target/i386/mvc1.c		dg-require-ifunc ""
gcc.target/i386/mvc2.c		00
gcc.target/i386/mvc3.c		00 (dg-error)
gcc.target/i386/mvc4.c		dg-require-ifunc ""
gcc.target/i386/mvc5.c		dg-require-ifunc ""
gcc.target/i386/mvc6.c		00
gcc.target/i386/mvc7.c		dg-require-ifunc ""
gcc.target/i386/mvc8.c		dg-require-ifunc ""
gcc.target/i386/mvc9.c		dg-require-ifunc ""
gcc.target/i386/pr78419.c	dg-require-ifunc ""
gcc.target/i386/pr80732.c	dg-require-ifunc ""
gcc.target/i386/pr81214.c	dg-require-ifunc ""
gcc.target/powerpc/clone1.c	powerpc*-*-linux* && lp64

Of those without dg-require-ifunc, the powerpc one is (sort of) ok since
it's restricted to Linux, and those with dg-warning/dg-error are too
since the warnings is emitted before the error about missing ifunc
support.  That leaves us with gcc.target/i386/mvc2.c, which is sort of
weird because it emits no code at all.  No idea if this intended,
though.

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University


2017-07-03  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	* gcc.target/i386/mvc6.c: Require ifunc support.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: testsuite-i386-mvc6-ifunc.patch --]
[-- Type: text/x-patch, Size: 496 bytes --]

# HG changeset patch
# Parent  69f342cb37ffd9b438e9a09ca3ad5692c2aa1dec
Require ifunc support in gcc.target/i386/mvc6.c

diff --git a/gcc/testsuite/gcc.target/i386/mvc6.c b/gcc/testsuite/gcc.target/i386/mvc6.c
--- a/gcc/testsuite/gcc.target/i386/mvc6.c
+++ b/gcc/testsuite/gcc.target/i386/mvc6.c
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-require-ifunc "" } */
 /* { dg-options "-O3" } */
 /* { dg-final { scan-assembler "vpshufb" } } */
 /* { dg-final { scan-assembler "punpcklbw" } } */

  parent reply	other threads:[~2017-07-03 13:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-30  8:49 Martin Liška
2017-06-30 12:38 ` Jan Hubicka
2017-07-03 13:44 ` Rainer Orth [this message]
2017-07-04  7:42   ` Martin Liška

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=ydd4luthby7.fsf@CeBiTec.Uni-Bielefeld.DE \
    --to=ro@cebitec.uni-bielefeld.de \
    --cc=dominiq@lps.ens.fr \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=meissner@linux.vnet.ibm.com \
    --cc=mliska@suse.cz \
    /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).