From patchwork Tue Dec 18 13:32:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jozef Lawrynowicz X-Patchwork-Id: 1015356 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-492727-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=mittosystems.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="HPGHdJwh"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=mittosystems.com header.i=@mittosystems.com header.b="LKmjU+3D"; 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 43JzV00Nvvz9s3q for ; Wed, 19 Dec 2018 00:32:38 +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:mime-version:content-type; q=dns; s= default; b=kDa04/ZbxIYoJ5hc+9cpuY2d8jLDTmuHawnp1s6QMHtnCzXGqv214 H4BAIZ0rUpK79tWKiYGUj63MrBz5YqgA+kQwdMRCoy7VeU8eFJsSCr2DH7Th3hL2 RNAvEL1zawwx5bD7RqYAv5a5+tGQUb7zL0pI8Vvb6FfBhBP4exsU1Q= 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=k4FrFCdkt4Z+EqNSUR8cTPuDTyI=; b=HPGHdJwhHJF9AUdFov5c +qXhGtM11Eyv+Ua5PV0GGuw7uEiDh7JWzTXhpxAzwLaoqKjG9uDhK0YD0uY0zm29 41pSXvl8+I/+JaHZ0fodQ0hyRA6YxeGDZwBLaPUkjm96oo0wudO30gp418N3vND3 4f59pHNsPj0i6EcuxhdYoE0= Received: (qmail 72498 invoked by alias); 18 Dec 2018 13:32:30 -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 72394 invoked by uid 89); 18 Dec 2018 13:32:22 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-11.1 required=5.0 tests=BAYES_00, GIT_PATCH_2, GIT_PATCH_3, KAM_ASCII_DIVIDERS, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=UD:tree-vectorizer.c X-HELO: mail-wr1-f52.google.com Received: from mail-wr1-f52.google.com (HELO mail-wr1-f52.google.com) (209.85.221.52) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 18 Dec 2018 13:32:20 +0000 Received: by mail-wr1-f52.google.com with SMTP id u4so14950585wrp.3 for ; Tue, 18 Dec 2018 05:32:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mittosystems.com; s=google; h=date:from:to:subject:message-id:mime-version; bh=RrZs65FceFg6nXnPkg+N2838cBdan9MBLLzS3Ti9ARk=; b=LKmjU+3Dd3Z9w3oULo45xySZS0iaCQpiePTZHpfR48OADTdU+M5jkd8EiCv31O/fUz vgIu6NI/gzMXf5CMNrf1/Q+rDNVVIxwUHVebydetmwRvng6rNmjyHIp+7e9XOQfEn0Ys p5rkOnJYtGtkFY8IxfqdN5rSV/0W9LFhmw3SNGa8zrM4AVxVtr/5WceinJjRBJFFq8IH yfa3ollyJOZ7SPWLmRzuAxheZMymoQK4Jzt4n+III/df64cj1QSyoieGt860OQB7+DIG 1Ysgxjm+aR1pZSb2rEh3a1c28fmJoFV1cKHv640as4KOWZplhh9zwCbHgJ7g4O8N9gjH j7vg== Received: from jozef-Aspire-VN7-793G ([37.156.72.51]) by smtp.gmail.com with ESMTPSA id s81sm2465424wmf.14.2018.12.18.05.32.17 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 18 Dec 2018 05:32:17 -0800 (PST) Date: Tue, 18 Dec 2018 13:32:15 +0000 From: Jozef Lawrynowicz To: gcc-patches@gcc.gnu.org Subject: [committed][MSP430] Define TARGET_VTABLE_ENTRY_ALIGN Message-ID: <20181218133215.63e5dd47@jozef-Aspire-VN7-793G> MIME-Version: 1.0 X-IsSubscribed: yes TARGET_VTABLE_ENTRY_ALIGN defaults to POINTER_SIZE, which is 20 for msp430-elf -mlarge. g++.dg/torture/pr41257.C ICEs after the invalid alignment of 20 is set. > during GIMPLE pass: slp > gcc/testsuite/g++.dg/torture/pr41257.C: In function 'void bar()': > gcc/testsuite/g++.dg/torture/pr41257.C:17:6: internal compiler error: in dr_analyze_innermost, at tree-data-ref.c:911 > 17 | void bar() > | ^~~ > 0x1427a98 dr_analyze_innermost(innermost_loop_behavior*, tree_node*, loop*, gimple const*) > gcc/build/../gcc/tree-data-ref.c:910 > 0x14285ab create_data_ref(edge_def*, loop*, tree_node*, gimple*, bool, bool) > gcc/build/../gcc/tree-data-ref.c:1241 > 0x1428965 find_data_references_in_stmt(loop*, gimple*, vec*) > gcc/build/../gcc/tree-data-ref.c:5089 > 0x1440d5d vect_find_stmt_data_reference(loop*, gimple*, vec*) > gcc/build/../gcc/tree-vect-data-refs.c:3949 > 0x1034f0e vect_slp_bb(basic_block_def*) > gcc/build/../gcc/tree-vect-slp.c:3020 > 0x10381ea execute > gcc/build/../gcc/tree-vectorizer.c:1295 Pointer alignment is always 16 for MSP430, the attached patch (committed to trunk) sets TARGET_VTABLE_ENTRY_ALIGN to 16 for MSP430. This fixes the above ICE. Index: gcc/ChangeLog =================================================================== --- gcc/ChangeLog (revision 267228) +++ gcc/ChangeLog (revision 267229) @@ -1,3 +1,7 @@ +2018-12-18 Jozef Lawrynowicz + + * config/msp430/msp430.h: Define TARGET_VTABLE_ENTRY_ALIGN. + 2018-12-18 Jakub Jelinek PR target/88513 Index: gcc/config/msp430/msp430.h =================================================================== --- gcc/config/msp430/msp430.h (revision 267228) +++ gcc/config/msp430/msp430.h (revision 267229) @@ -159,6 +159,11 @@ #define PTR_SIZE (TARGET_LARGE ? 4 : 2) #define POINTERS_EXTEND_UNSIGNED 1 +/* TARGET_VTABLE_ENTRY_ALIGN defaults to POINTER_SIZE, which is 20 for + TARGET_LARGE. Pointer alignment is always 16 for MSP430, so set explicitly + here. */ +#define TARGET_VTABLE_ENTRY_ALIGN 16 + #define ADDR_SPACE_NEAR 1 #define ADDR_SPACE_FAR 2