From patchwork Mon Nov 16 12:42:36 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Lawrence X-Patchwork-Id: 544991 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 1E6CA141463 for ; Mon, 16 Nov 2015 23:42:59 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=Iw04FxIC; 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:date:message-id:content-type :content-transfer-encoding; q=dns; s=default; b=bLww+NXTFwNNGw6Y /cT4usUUuwD0IvwHrU+4AoT3ZSRMeSQboSQHlB4yIL0Kr+PBZzjgO9NJXr0LRdV6 hJvVfWP+ETOCs9wWm4kqwS8Avp9MduSQpoH7g0PcsDLnPo2Szys6CwUfp39hFO53 EsDnPFcN8DAld3QVXl7ZROx3nsk= 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:date:message-id:content-type :content-transfer-encoding; s=default; bh=9xiYyT++oLzVYMOTDS9L38 54vhY=; b=Iw04FxICQVnV4lTW7wh8VxkSz59LhaZ0pFDUpkK26HQ77HhXjaciu/ YN2gE6wE6toh0NlhIkn1qsgWgLjhfx8EQLXK0chW5BRX3tD7Dp6aFHQEYvB/kzHd PfyDds8sFZgQ09GYp4IAnOnM+vXCYlwSxTBb3+OXn8qebK738iDWc= Received: (qmail 7168 invoked by alias); 16 Nov 2015 12:42:52 -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 7155 invoked by uid 89); 16 Nov 2015 12:42:52 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL, BAYES_00, SPF_PASS autolearn=ham version=3.3.2 X-HELO: eu-smtp-delivery-143.mimecast.com Received: from eu-smtp-delivery-143.mimecast.com (HELO eu-smtp-delivery-143.mimecast.com) (207.82.80.143) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 16 Nov 2015 12:42:50 +0000 Received: from cam-owa2.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.140]) by eu-smtp-1.mimecast.com with ESMTP id uk-mta-4-fYwwt4kSQC6GKmEiNsX_Gw-1; Mon, 16 Nov 2015 12:42:45 +0000 Received: from arm.com ([10.1.2.79]) by cam-owa2.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 16 Nov 2015 12:42:45 +0000 From: Alan Lawrence To: gcc-patches@gcc.gnu.org Cc: marcus.shawcroft@arm.com, james.greenhalgh@arm.com Subject: [Obvious][AArch64] Fix gcc.target/aarch64/vclz.c Date: Mon, 16 Nov 2015 12:42:36 +0000 Message-Id: <1447677756-28680-1-git-send-email-alan.lawrence@arm.com> X-MC-Unique: fYwwt4kSQC6GKmEiNsX_Gw-1 X-IsSubscribed: yes The scan-assembler vclz....2s 34 test in here has been failing since r230091: * tree-vect-slp.c (vect_bb_vectorization_profitable_p): Make equal cost favor vectorized version. which transforms a load of piecewise array assignments (in tree) into 2-element-vector writes to MEMs, and the first RUN_TEST for the V2SI cases then constant-propagates because the INHIB_OPTIMIZATION (which clobbers the data arrays) comes after the load from those arrays. Hence, put the INHIB_OPTIMIZATION in the right place. Moreover, the memory clobber does not affect the registers now holding the values loaded anyway, so we can drop the second one altogether. Tested on aarch64-none-linux-gnu, committed as r230421. gcc/testsuite/ChangeLog: * gcc.target/aarch64/vclz.c: Correctly place INHIB_OPTIMIZATION. --- gcc/testsuite/gcc.target/aarch64/vclz.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/gcc/testsuite/gcc.target/aarch64/vclz.c b/gcc/testsuite/gcc.target/aarch64/vclz.c index 455ba63..60494a8 100644 --- a/gcc/testsuite/gcc.target/aarch64/vclz.c +++ b/gcc/testsuite/gcc.target/aarch64/vclz.c @@ -67,18 +67,13 @@ extern void abort (void); CONCAT1 (vclz, POSTFIX (reg_len, data_len, is_signed)) #define RUN_TEST(test_set, answ_set, reg_len, data_len, is_signed, n) \ + INHIB_OPTIMIZATION; \ a = LOAD_INST (reg_len, data_len, is_signed) (test_set); \ b = LOAD_INST (reg_len, data_len, is_signed) (answ_set); \ - INHIB_OPTIMIZATION; \ a = CLZ_INST (reg_len, data_len, is_signed) (a); \ for (i = 0; i < n; i++) \ - { \ - INHIB_OPTIMIZATION; \ - if (a [i] != b [i]) \ - { \ - return 1; \ - } \ - } + if (a [i] != b [i]) \ + return 1; int test_vclz_s8 ()