From patchwork Thu Oct 17 09:58:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Biener X-Patchwork-Id: 1178436 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-511197-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="SXRjbYng"; 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 46v4Nh5kfcz9sNw for ; Thu, 17 Oct 2019 20:58:11 +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=SVO+NgChNJqXY/UUjuO4ZQMqJt1sVcmYMMeS+dW/kFvyTMAGOR12k OTU3725YCGREkUQoeAks57G8o2CVaVgbOASCT/zfTh7X8PXIxg7mv5fQIrbLHsmG k55Gzhd3v/+8fvJhezek9hzTl9UpxxYCEuJTjA1FCrlXocpwSvCDCc= 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=VJRqmV+8ywcGQbZRPyBO5zSJLkg=; b=SXRjbYng5jBegQ+uuPsG HT984ZpHeld/t1eUhymi0pdMkOiCKS4h77PlatCN8KlT6uF4XMTRUAOCywxW8hdg xib14TY3/1W6weWwEaiDICMoorqHNzSzomPkiDZtAXtA+WcZH0LVMmgCNWtZ/+sd xXusvupadoxt5TtS0mc1iyE= Received: (qmail 128000 invoked by alias); 17 Oct 2019 09:58:03 -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 127991 invoked by uid 89); 17 Oct 2019 09:58:03 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-10.8 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, SPF_PASS autolearn=ham version=3.3.1 spammy= 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; Thu, 17 Oct 2019 09:58:02 +0000 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id A8CDDB766 for ; Thu, 17 Oct 2019 09:58:00 +0000 (UTC) Date: Thu, 17 Oct 2019 11:58:00 +0200 (CEST) From: Richard Biener To: gcc-patches@gcc.gnu.org Subject: [PATCH] Fix TARGET_MEM_REF handling in PRE Message-ID: User-Agent: Alpine 2.21 (LSU 202 2017-01-01) MIME-Version: 1.0 It's not exercised but I ran into this with trying PRE after IVOPTs. Committed as obvious. Richard. 2019-10-17 Richard Biener * tree-ssa-pre.c (create_component_ref_by_pieces_1): Fix TARGET_MEM_REF creation. Index: gcc/tree-ssa-pre.c =================================================================== --- gcc/tree-ssa-pre.c (revision 277094) +++ gcc/tree-ssa-pre.c (working copy) @@ -2492,7 +2492,7 @@ create_component_ref_by_pieces_1 (basic_ case TARGET_MEM_REF: { tree genop0 = NULL_TREE, genop1 = NULL_TREE; - vn_reference_op_t nextop = &ref->operands[++*operand]; + vn_reference_op_t nextop = &ref->operands[(*operand)++]; tree baseop = create_component_ref_by_pieces_1 (block, ref, operand, stmts); if (!baseop)