From patchwork Wed Sep 6 12:56:58 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Biener X-Patchwork-Id: 810574 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-461601-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="tsS7kZwR"; dkim-atps=neutral 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 3xnNs137HCz9sBd for ; Wed, 6 Sep 2017 22:57:09 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type; q=dns; s= default; b=l/3DqlGoxwiDyuiyneRFOKpl7//GCg1IvKmQ75qNNEzsbxGlGEWSi V0NmpZl2wHTrOl9Su98oZRpxOvenE8BERX2K1P0kXIVpkJT7JEll/yrotwHLD3iU kI20QzyDyMuy2jwvkJHkuAyTy6RVzVYKSW6pNTIeIvBSIznJZlsy54= 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:date :from:to:subject:message-id:mime-version:content-type; s= default; bh=dmXUwiTPK8fckfMGBD83fMLJQI4=; b=tsS7kZwRIi6MgreFR9aI Olpb2h7uxhKgdaU7Flbz5NVZfm13LhfBzow913GC5cr94BJMudTnjFgPN3mpANpg fmCU8Rg+55PMwh5cesiIHDOtOjj6jc5KZpeBX42+ZoHom0hYx43EIBanEhZrQkTo n9uOfo8zdwEsNCxmA6D73/s= Received: (qmail 66037 invoked by alias); 6 Sep 2017 12:57:02 -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 66028 invoked by uid 89); 6 Sep 2017 12:57:02 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-11.9 required=5.0 tests=BAYES_00, GIT_PATCH_2, GIT_PATCH_3, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 spammy=vf, u.s, us X-HELO: mx1.suse.de Received: from mx2.suse.de (HELO mx1.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 06 Sep 2017 12:57:01 +0000 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 2A4F8ABDF for ; Wed, 6 Sep 2017 12:56:59 +0000 (UTC) Date: Wed, 6 Sep 2017 14:56:58 +0200 (CEST) From: Richard Biener To: gcc-patches@gcc.gnu.org Subject: [PATCH] Adjust gcc.c-torture/execute/20050604-1.c Message-ID: User-Agent: Alpine 2.20 (LSU 67 2015-01-07) MIME-Version: 1.0 When fiddling around with vector lowering I found the following adjusted testcase helpful testing proper vector lowering of word_mode vector plus. Tested on x86_64-unknown-linux-gnu, applied. Richard. 2017-09-06 Richard Biener * gcc.c-torture/execute/20050604-1.c: Adjust to be a better test for correctness of vector lowering. Index: gcc/testsuite/gcc.c-torture/execute/20050604-1.c =================================================================== --- gcc/testsuite/gcc.c-torture/execute/20050604-1.c (revision 251790) +++ gcc/testsuite/gcc.c-torture/execute/20050604-1.c (working copy) @@ -6,7 +6,7 @@ extern void abort (void); -typedef short v4hi __attribute__ ((vector_size (8))); +typedef unsigned short v4hi __attribute__ ((vector_size (8))); typedef float v4sf __attribute__ ((vector_size (16))); union @@ -26,7 +26,7 @@ foo (void) { unsigned int i; for (i = 0; i < 2; i++) - u.v += (v4hi) { 12, 14 }; + u.v += (v4hi) { 12, 32768 }; for (i = 0; i < 2; i++) v.v += (v4sf) { 18.0, 20.0, 22 }; } @@ -35,7 +35,7 @@ int main (void) { foo (); - if (u.s[0] != 24 || u.s[1] != 28 || u.s[2] || u.s[3]) + if (u.s[0] != 24 || u.s[1] != 0 || u.s[2] || u.s[3]) abort (); if (v.f[0] != 36.0 || v.f[1] != 40.0 || v.f[2] != 44.0 || v.f[3] != 0.0) abort ();