From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 55886 invoked by alias); 4 Dec 2018 23:29:25 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 55872 invoked by uid 89); 4 Dec 2018 23:29:24 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-11.4 required=5.0 tests=BAYES_00,GIT_PATCH_2,GIT_PATCH_3,KAM_NUMSUBJECT,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=i686-linux, i686linux, Hx-languages-length:1111 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 04 Dec 2018 23:29:23 +0000 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id EDE0B300295C for ; Tue, 4 Dec 2018 23:29:21 +0000 (UTC) Received: from tucnak.zalov.cz (ovpn-117-214.ams2.redhat.com [10.36.117.214]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 935C11001944 for ; Tue, 4 Dec 2018 23:29:21 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id wB4NTJ73009637 for ; Wed, 5 Dec 2018 00:29:19 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id wB4NTIvN009636 for gcc-patches@gcc.gnu.org; Wed, 5 Dec 2018 00:29:18 +0100 Date: Tue, 04 Dec 2018 23:29:00 -0000 From: Jakub Jelinek To: gcc-patches@gcc.gnu.org Subject: [committed] Add testcase for already fixed PR tree-optimization/87320 Message-ID: <20181204232918.GD12380@tucnak> Reply-To: Jakub Jelinek MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.9.2 (2017-12-15) X-IsSubscribed: yes X-SW-Source: 2018-12/txt/msg00243.txt.bz2 Hi! I've committed the following testcase for already fixed PR, which has been fixed by the PR87288 fix, after testing on x86_64-linux and i686-linux. 2018-12-04 Jakub Jelinek PR tree-optimization/87320 * gcc.dg/pr87320.c: New test. --- gcc/testsuite/gcc.dg/pr87320.c.jj 2018-12-04 19:16:45.370455885 +0100 +++ gcc/testsuite/gcc.dg/pr87320.c 2018-12-04 19:16:38.428568535 +0100 @@ -0,0 +1,28 @@ +/* PR tree-optimization/87320 */ +/* { dg-do run } */ +/* { dg-options "-O3" } */ +/* { dg-additional-options "-mavx" { target avx_runtime } } */ + +static void __attribute__ ((noinline)) +transpose_vector (unsigned long n) +{ + unsigned long data[2 * n]; + for (unsigned long i = 0; i < 2 * n; i++) + data[i] = 4 * i + 2; + + unsigned long transposed[n]; + for (unsigned long i = 0; i < n; i++) + transposed[i] = data[2 * i]; + + for (unsigned long i = 0; i < n; i++) + if (transposed[i] != 8 * i + 2) + __builtin_abort (); +} + +int +main () +{ + transpose_vector (4); + transpose_vector (120); + return 0; +} Jakub