From patchwork Tue Nov 19 08:57:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 1197299 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-513994-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="mZ1bmXy3"; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="DsQsJLIU"; 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 47HKV42B9zz9s4Y for ; Tue, 19 Nov 2019 19:58:02 +1100 (AEDT) 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:reply-to:mime-version:content-type :content-transfer-encoding; q=dns; s=default; b=Pq32UOREmEO8Xbww eWsbgoM+Cxq2foD6fJdtwJufHerkRZjbQaQatTrceDRxbrggehXr7fpYOg0N3dzC HZVaRMxOJuF9XSTQZRNHRSzAZ22XkfnzH2DjcZV4g9QR+eBfTZPD+uVYpEn6fkII v8Wd0sOEgVROXs5zx00dDtcgots= 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:reply-to:mime-version:content-type :content-transfer-encoding; s=default; bh=G+RSSdA6DXtg56PyXXAVEr 40FR0=; b=mZ1bmXy3Mtf3eXWDkO5gYCcHQqOb3vyyObm6evfxv/VDGE8ct00Ips 0T30lnKS1icKp9R7IDyA4Krrd6FPurTO14SFE0FU2YFTLCNQEtFR8/WD02zqBZwR It3e9xaXQu31V/COVcWvikvQrtf1JCIgu5FFHKzddgHPedChrniME= Received: (qmail 89792 invoked by alias); 19 Nov 2019 08:57:47 -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 89708 invoked by uid 89); 19 Nov 2019 08:57:47 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-7.7 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: us-smtp-delivery-1.mimecast.com Received: from us-smtp-1.mimecast.com (HELO us-smtp-delivery-1.mimecast.com) (205.139.110.61) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 19 Nov 2019 08:57:45 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1574153863; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nqdmT75V6iBiYdp0rpSCAyPnjZ7j5KC/Rn4AGhHhNIc=; b=DsQsJLIUkryN2Gpgv76O23pSa8oM7i8s5gLlCf63wpCpZDnmhmV7DM7zfr7HOPx6xmdCJR +HTf20BFvmyUVhrff4rRTcbDkKijhP1vnerIy00hQXmIpFIXm0HeJg6N+RgLNm0Du3spLu zx9cRaMBTGQRsWjNH9Lsz3x1LoLxUdU= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-376-VOEU3tg1OHyWCiM1kDYXsQ-1; Tue, 19 Nov 2019 03:57:42 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 895C7107ACC4 for ; Tue, 19 Nov 2019 08:57:41 +0000 (UTC) Received: from tucnak.zalov.cz (ovpn-116-21.ams2.redhat.com [10.36.116.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 324C260561 for ; Tue, 19 Nov 2019 08:57:40 +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 xAJ8vdGU019863 for ; Tue, 19 Nov 2019 09:57:39 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id xAJ8vcKi019862 for gcc-patches@gcc.gnu.org; Tue, 19 Nov 2019 09:57:38 +0100 Date: Tue, 19 Nov 2019 09:57:37 +0100 From: Jakub Jelinek To: gcc-patches@gcc.gnu.org Subject: [committed] Punt instead of assertion failure when TYPE_MODE is not vmode (PR tree-optimization/92557) Message-ID: <20191119085737.GC4650@tucnak> Reply-To: Jakub Jelinek MIME-Version: 1.0 User-Agent: Mutt/1.11.3 (2019-02-01) X-Mimecast-Spam-Score: 0 Content-Disposition: inline X-IsSubscribed: yes Hi! This patch restores the previous behavior, there could be many reasons why TYPE_MODE is BLKmode or some integral mode instead of a vector mode, unsupported vector mode, lack of available registers etc. Bootstrapped/regtested on x86_64-linux and i686-linux, committed to trunk. 2019-11-19 Jakub Jelinek PR tree-optimization/92557 * omp-low.c (omp_clause_aligned_alignment): Punt if TYPE_MODE is not vmode rather than asserting it always is. * gcc.dg/gomp/pr92557.c: New test. Jakub --- gcc/omp-low.c.jj 2019-11-15 00:37:26.359069152 +0100 +++ gcc/omp-low.c 2019-11-18 16:17:27.767714777 +0100 @@ -4086,8 +4086,8 @@ omp_clause_aligned_alignment (tree claus if (type == NULL_TREE || TYPE_MODE (type) != mode) continue; type = build_vector_type_for_mode (type, vmode); - /* The functions above are not allowed to return invalid modes. */ - gcc_assert (TYPE_MODE (type) == vmode); + if (TYPE_MODE (type) != vmode) + continue; if (TYPE_ALIGN_UNIT (type) > al) al = TYPE_ALIGN_UNIT (type); } --- gcc/testsuite/gcc.dg/gomp/pr92557.c.jj 2019-11-18 16:18:18.246961685 +0100 +++ gcc/testsuite/gcc.dg/gomp/pr92557.c 2019-11-18 16:19:21.531017555 +0100 @@ -0,0 +1,13 @@ +/* PR tree-optimization/92557 */ +/* { dg-do compile } */ +/* { dg-additional-options "-maltivec" { target powerpc*-*-* } } */ + +void +foo (double *p) +{ + int i; + +#pragma omp simd aligned (p) + for (i = 0; i < 1; ++i) + p[i] = 7.0; +}