From patchwork Mon Jul 3 13:44:32 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rainer Orth X-Patchwork-Id: 783496 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3x1T045P4Lz9s74 for ; Mon, 3 Jul 2017 23:44:52 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="ygXdvn4B"; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:references:date:in-reply-to:message-id :mime-version:content-type; q=dns; s=default; b=dsNjX1BpK9m34xYX 6EsAvvkrq7XXek5d9oVpg4sfwiRruwNpXcRXqaklqionDAyrhU1ZKwf+lLp77Uyo N+PbTqDMouOARGS4tz4XCckjtPMIutfrOs7nomOo2v+gB6RiNCSGFUgziSZYm64b B9yF/YWVF6fkoTk9iQsKAg0Egyo= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:references:date:in-reply-to:message-id :mime-version:content-type; s=default; bh=1bHHNeJQ3kaKsXgBXu067d lOQRs=; b=ygXdvn4B0Qpp7J2lIWxG8TIlQc4fvQh000XZZqCZbc+RT4SQln3XcM 9BE7kdbmuy/q2mDNAuPNI1kYwGdXkR6ydL89zBe3SdVnu8tZ1e11gWvU9Hzt5fud 3yB5uL8g2BLIoJE2BXOllzAeDce/NSyVpmPSni23zrIjyyVRIaVQ8= Received: (qmail 111121 invoked by alias); 3 Jul 2017 13:44:42 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 111099 invoked by uid 89); 3 Jul 2017 13:44:41 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-19.2 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=HCc:D*fr, H*Ad:U*meissner X-HELO: smtp.CeBiTec.Uni-Bielefeld.DE Received: from smtp.CeBiTec.Uni-Bielefeld.DE (HELO smtp.CeBiTec.Uni-Bielefeld.DE) (129.70.160.84) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 03 Jul 2017 13:44:39 +0000 Received: from localhost (localhost.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id A11AF676; Mon, 3 Jul 2017 15:44:36 +0200 (CEST) Received: from smtp.CeBiTec.Uni-Bielefeld.DE ([127.0.0.1]) by localhost (malfoy.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) (amavisd-new, port 10024) with LMTP id NJ6ZbsiOJNZI; Mon, 3 Jul 2017 15:44:34 +0200 (CEST) Received: from lokon.CeBiTec.Uni-Bielefeld.DE (lokon.CeBiTec.Uni-Bielefeld.DE [129.70.161.152]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPS id D8AB5675; Mon, 3 Jul 2017 15:44:33 +0200 (CEST) Received: (from ro@localhost) by lokon.CeBiTec.Uni-Bielefeld.DE (8.15.2+Sun/8.15.2/Submit) id v63DiWii007643; Mon, 3 Jul 2017 15:44:32 +0200 (MEST) From: Rainer Orth To: Martin =?utf-8?Q?Li=C5=A1ka?= Cc: gcc-patches@gcc.gnu.org, Michael Meissner , "Dominique d'Humieres" Subject: Re: [PATCH] Fix removal of ifunc (PR ipa/81214). References: Date: Mon, 03 Jul 2017 15:44:32 +0200 In-Reply-To: ("Martin =?utf-8?Q?Li=C5=A1ka=22's?= message of "Fri, 30 Jun 2017 10:49:03 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (usg-unix-v) MIME-Version: 1.0 X-IsSubscribed: yes 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 # 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" } } */