From patchwork Thu Feb 28 13:18:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 1049449 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-497152-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="VCXhY50E"; 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 449Cmw09q5z9s71 for ; Fri, 1 Mar 2019 00:18:49 +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:cc:subject:message-id:reply-to:mime-version :content-type; q=dns; s=default; b=E9Ex8dGx9icp9ajljsNVOvLJQshDI /HRXjy52DRWrtgwF6jP7f8XMKvhblQVAybnjxHy0ciR/l1kC3nN8X9tqWTushn9P B6lZLP4p2VrO/hZHvysDIUGby6Eyx+ilg4QGpXw8aTWDUl3bZpCjRQCH1EMVseeB jCAFwqyGnL8YeY= 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:cc:subject:message-id:reply-to:mime-version :content-type; s=default; bh=EFrqz+JBundOn/3tIfTbXOsvrbg=; b=VCX hY50Elkk3Uh2S7Hcn4F/W+vuQFQzlpf5Bldkgx4Pm5JTDbNEvsgtPd4Pfq6KkTc5 MFKOXiYfStJzWQd7MiFlmAIDy5pxnXXoHokVbhJ4Rem0xwyRZr4HrhOczbVZmDfv j0Os+RBQtJY6Q2KUxIe+jVZ8JnC8zfK2apxt9aKI= Received: (qmail 91371 invoked by alias); 28 Feb 2019 13:18:42 -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 91356 invoked by uid 89); 28 Feb 2019 13:18:42 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-11.9 required=5.0 tests=BAYES_00, GIT_PATCH_2, GIT_PATCH_3, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=HOST_WIDE_INT, host_wide_int, match_dup, set_attr X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 28 Feb 2019 13:18:40 +0000 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 385AD8E8CE; Thu, 28 Feb 2019 13:18:39 +0000 (UTC) Received: from tucnak.zalov.cz (ovpn-117-64.ams2.redhat.com [10.36.117.64]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CD7624384; Thu, 28 Feb 2019 13:18:38 +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 x1SDIaHe008559; Thu, 28 Feb 2019 14:18:36 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id x1SDIYiJ008558; Thu, 28 Feb 2019 14:18:34 +0100 Date: Thu, 28 Feb 2019 14:18:34 +0100 From: Jakub Jelinek To: gcc-patches@gcc.gnu.org Cc: Kyrill Tkachov Subject: [committed] Fix ARM ICE on glibc (PR target/89434) Message-ID: <20190228131834.GD7611@tucnak> Reply-To: Jakub Jelinek MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-IsSubscribed: yes Hi! 0x80000000 (in RTL (const_int 0xffffffff80000000)) is valid the "I" constraint and should be allowed for sbcs, but because HOST_WIDE_INT is 64-bit, UINTVAL (operands[2]) == -UINTVAL (operands[3]) is actually not true for that. Fixed thusly, bootstrapped/regtested on armv7hl-linux-gnueabi, preapproved in the PR by Kyrill, committed to trunk. Sorry for the breakage. Note, using UINTVAL actually isn't necessary, I used it for the fear that there might be UB in the compiler, but because these values must be valid SImode CONST_INTs and -INTVAL is only UB for 0x8000000000000000 which is not a valid SImode CONST_INT, we don't need to negate in unsigned type. 2019-02-28 Jakub Jelinek PR target/89434 * config/arm/arm.md (*subsi3_carryin_compare_const): Use trunc_int_for_mode (-INTVAL (...), SImode), just instead of -UINTVAL (...). Jakub --- gcc/config/arm/arm.md.jj 2019-02-25 11:32:02.914684615 +0100 +++ gcc/config/arm/arm.md 2019-02-26 14:41:41.128767480 +0100 @@ -1185,7 +1187,9 @@ (define_insn "*subsi3_carryin_compare_co (minus:SI (plus:SI (match_dup 1) (match_operand:SI 3 "arm_neg_immediate_operand" "L")) (ltu:SI (reg:CC_C CC_REGNUM) (const_int 0))))] - "TARGET_32BIT && UINTVAL (operands[2]) == -UINTVAL (operands[3])" + "TARGET_32BIT + && (INTVAL (operands[2]) + == trunc_int_for_mode (-INTVAL (operands[3]), SImode))" "sbcs\\t%0, %1, #%n3" [(set_attr "conds" "set") (set_attr "type" "adcs_imm")]