From patchwork Sun Oct 4 16:01:33 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Uros Bizjak X-Patchwork-Id: 526174 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 63A7B1402A2 for ; Mon, 5 Oct 2015 03:01:43 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=lD5hKkVl; 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 :mime-version:date:message-id:subject:from:to:cc:content-type; q=dns; s=default; b=QFBV7b91VtvNaP9coYjoDZAjC5gadpPqs9W03Obj1Jr IVZxfIoRQ6Y1szaTPo8jSDiRtlFJx/N4/PjK+eUMSe8cOMiOFXy76lXLbHY3RAJR jwcJipndvE9j06K1VsZo5OFHMa9K9llZQXqqYxj2WpIEwRC31H1A1v+Q9Bo9BIz8 = 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 :mime-version:date:message-id:subject:from:to:cc:content-type; s=default; bh=tQf4pfRdrYgWolZdSU2auxCQbMM=; b=lD5hKkVlnWRxy4//V BEI2l4Ozwwzk09gLyGaT0Cqh/5FwgzYM/Hpbt8RwrKK12G5fLuXjZEf+JHofZknP cl9VOYbzJyrRE7v6Lsgg8rHV0ng3HZBQvLEstoWitxf5Gup18eBDeGfXPW0IAwC2 yRUwZWU5OH8eQJk0biGC8og7KI= Received: (qmail 68382 invoked by alias); 4 Oct 2015 16:01:37 -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 68366 invoked by uid 89); 4 Oct 2015 16:01:36 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: mail-vk0-f51.google.com Received: from mail-vk0-f51.google.com (HELO mail-vk0-f51.google.com) (209.85.213.51) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Sun, 04 Oct 2015 16:01:35 +0000 Received: by vkgd64 with SMTP id d64so84151453vkg.0; Sun, 04 Oct 2015 09:01:33 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.31.147.129 with SMTP id v123mr17293232vkd.23.1443974493024; Sun, 04 Oct 2015 09:01:33 -0700 (PDT) Received: by 10.103.40.68 with HTTP; Sun, 4 Oct 2015 09:01:33 -0700 (PDT) Date: Sun, 4 Oct 2015 18:01:33 +0200 Message-ID: Subject: [PATCH, i386]: Add a testcase for PR67447 (AKA 67756), insn does not satisfy its constraints From: Uros Bizjak To: "gcc-patches@gcc.gnu.org" Cc: Vladimir Makarov , miyuki@gcc.gnu.org This PR was fixed by [1]. This patch adds the testcase from PR that failed on x86 target for the same reason. 2015-10-04 Uros Bizjak PR rtl-optimization/67447 * gcc.target/i386/pr67447.c: New test. Tested on x86_64-linux-gnu {,-m32} and committed to mainline SVN. [1] https://gcc.gnu.org/ml/gcc-patches/2015-10/msg00225.html Uros. Index: gcc.target/i386/pr67447.c =================================================================== --- gcc.target/i386/pr67447.c (revision 0) +++ gcc.target/i386/pr67447.c (working copy) @@ -0,0 +1,25 @@ +/* { dg-do compile } */ +/* { dg-options "-O3 -march=haswell" } */ + +struct _GPart { + int *g; +}; +static int b, d, e; +int *c, *f, *g; +int a; + +int fn2(int, int); + +int fn1(int p1) { + int h = fn2(p1, (int)(long)&e); + for (; d < e; d++) + if (f[d] != a) + h += g ? g[f[d]] : 1; + return h; +} + +int main() { + struct _GPart *i; + for (; b < (int)(long)(i->g); b++) + c[b] = fn1((int)(long)i->g); +}