From patchwork Tue Sep 25 14:24:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Stubbs X-Patchwork-Id: 974447 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-486337-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="eV21AbHo"; 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 42KNdZ75Xtz9rxp for ; Wed, 26 Sep 2018 00:25:21 +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 :subject:to:cc:references:from:message-id:date:mime-version :in-reply-to:content-type; q=dns; s=default; b=b5Al7hcEpFgnFHN04 Cj/vy/GHHtSKXBxrXzfHUJdLkl9ujsmoSFwJTI49AxWV2sSo9lqak0mOrGRe7NZh iKVXVJx5n4Yg22AkjHVcPwcw8d/qeZGK4SwUp+RFlmc+Jg0IMETEO0lDQuj300Tu +6Ra+LdWlD4bxFxhFDOyR5zofQ= 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 :subject:to:cc:references:from:message-id:date:mime-version :in-reply-to:content-type; s=default; bh=vbRKQTH1nQfnuWnxpmGjGpl LMDY=; b=eV21AbHoB9tEYLmfGsioiEPzlKNEDoSwO3GJq6KXTIL4XoRv6TJq8Tu 5yC2kd1u/cdDyBexxynHPKt6BqL7swzbmngJ0WY76SQR6j71gYLt76h4sN3qjPX/ 2BBW3lwSQbIrrtd8PCFjcUDqgPsYS7r3O3vAkuyJmu95R+2fjGJ8= Received: (qmail 99709 invoked by alias); 25 Sep 2018 14:25:14 -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 99449 invoked by uid 89); 25 Sep 2018 14:25:14 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-24.9 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=H*r:0100, Hx-languages-length:1031 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 25 Sep 2018 14:25:12 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=svr-ies-mbx-01.mgc.mentorg.com) by relay1.mentorg.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-SHA384:256) id 1g4oGw-000308-H8 from Andrew_Stubbs@mentor.com ; Tue, 25 Sep 2018 07:25:06 -0700 Received: from [172.30.90.9] (137.202.0.90) by svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) with Microsoft SMTP Server (TLS) id 15.0.1320.4; Tue, 25 Sep 2018 15:25:01 +0100 Subject: [patch] Fix AArch64 ILP ICE To: Andreas Schwab CC: References: <87d0t5l61l.fsf@igel.home> From: Andrew Stubbs Message-ID: <54a5acc7-0629-32c1-c20e-b922e8809aaa@codesourcery.com> Date: Tue, 25 Sep 2018 15:24:54 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <87d0t5l61l.fsf@igel.home> On 22/09/18 19:51, Andreas Schwab wrote: > That breaks aarch64 ILP32. The problem is that the mode given to expand_expr is just a "hint", apparently, and it's being ignored. I'm testing the attached patch for GCN. It fixes the ICE for AArch64 just fine. OK? Andrew Fix AArch64 ILP32 ICE. Ensure that the address really is the correct mode for an address. 2018-09-25 Andrew Stubbs gcc/ * builtins.c (get_builtin_sync_mem): Force address mode conversion. diff --git a/gcc/builtins.c b/gcc/builtins.c index 1d4de09..956f872 100644 --- a/gcc/builtins.c +++ b/gcc/builtins.c @@ -5869,6 +5869,7 @@ get_builtin_sync_mem (tree loc, machine_mode mode) scalar_int_mode addr_mode = targetm.addr_space.address_mode (addr_space); addr = expand_expr (loc, NULL_RTX, addr_mode, EXPAND_SUM); + addr = convert_memory_address (addr_mode, addr); /* Note that we explicitly do not want any alias information for this memory, so that we kill all other live memories. Otherwise we don't