From patchwork Wed Sep 20 12:27:49 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Sandiford X-Patchwork-Id: 113113 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp706167qgf; Wed, 20 Sep 2017 05:28:11 -0700 (PDT) X-Received: by 10.84.179.129 with SMTP id b1mr1939249plc.316.1505910491763; Wed, 20 Sep 2017 05:28:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505910491; cv=none; d=google.com; s=arc-20160816; b=Jsy3ji2K1Z23a/UbkbK3wyvUQmSvfX28QFVOM6K3DT1vxICr7RwPLyRU3MEPdHHseb jmv8Kr1TaYUELI5mNc+J5ckerFBTg5NxYzvcLYvJFU+8lePrsvRN+0Xh7FImciLha6zF AJMo45H6N6kHWd8dDt4ep3cu5xnCZM7dbUXBHdOWF8dPB5XPpO/3kIVIdejYHDgEFXcH cj5Tm6t6R/lgBDMIbCiWsYFeCpf1y+jgcZt9l7j+E+imZVtdesTd9c13ojm0RLmPhL4j YOtIhBbWpK8IjrPaa7AxBDOJeiSgvyCBgsiVxyia9h8Z/gcwUY9vlcq2LoUF9UYY9G++ jQ2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:user-agent:message-id:date:subject:mail-followup-to:to :from:delivered-to:sender:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:mailing-list:dkim-signature :domainkey-signature:arc-authentication-results; bh=zv/C8DeWVk+OPvSc+mshKtVR8zP7oVW8/6sVp7u2OyA=; b=HsKNBXytizyNXDnXHFUkRg08HzyyAui/1dteMMR0/CGPwsn91g15Q0DBFjgy1deNpC Qc5ljm7cE7/SOHR4gA4L4h0iI1NSIj9uT43smDERhvu61EVMPJNdkA9UPHewo7wh1xRf 3FGsmrjvkMjY4qtUBrmix+KnDgMKC7ilB8TTRBfDEVEd5h0poPZObFo4bwFV9hoDwTHb bjR9DrXmxRAaiYnFZCP33RTtj6AB3f+G9PXpb0XNjMWGx02m6Ua4VS3K3D0CxSctNJ5U GP5dRE2NFdspIhZsXiAVsl4JszK5ofeKDeyJ3BEkdiFxtPnDH9odrnMbbyNnCiOs63Zi +fUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=yh5p1hOX; spf=pass (google.com: domain of gcc-patches-return-462584-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-462584-patch=linaro.org@gcc.gnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id a5si1282278pll.355.2017.09.20.05.28.11 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 Sep 2017 05:28:11 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-return-462584-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=yh5p1hOX; spf=pass (google.com: domain of gcc-patches-return-462584-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-462584-patch=linaro.org@gcc.gnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:subject:date:message-id:mime-version:content-type; q=dns; s= default; b=rGOHmBeWJlxj/5VaSvGP0s4FS4ygzwXqeXzIfWuByOLI1WTFAsuvP 7m1eGnV1U5FpAmestJflOeqDeQDUE633rA8LBn/JuWFnh8sYiNF3rg5dqKYd6Rh1 xeAP8HGUsDv3V72noMIlK3qEvwqnAvetKfmaQ0ONNshzxfHb+4Mc1o= 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:from :to:subject:date:message-id:mime-version:content-type; s= default; bh=lj8YD6j89Nu5aUOCE47tIh03uCI=; b=yh5p1hOXBHk4EGBUtq13 00LGkatmIIjwyI9XhMcfQHhN+xbrdbePikBwmmQQ8Gk0HLLkDxNE0mKw1Rpq5yfc YULpj7fHDd+6pdttjFd8Oo8SLJ/fK36McClMoRtHk7jgDR9cZvv2XBkkQueWb+5L Ei5qgPq7HxPu+hVsZ0yVw1E= Received: (qmail 64539 invoked by alias); 20 Sep 2017 12:27:57 -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 64309 invoked by uid 89); 20 Sep 2017 12:27:56 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-11.3 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM, SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-wm0-f47.google.com Received: from mail-wm0-f47.google.com (HELO mail-wm0-f47.google.com) (74.125.82.47) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 20 Sep 2017 12:27:54 +0000 Received: by mail-wm0-f47.google.com with SMTP id g206so6739617wme.0 for ; Wed, 20 Sep 2017 05:27:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:mail-followup-to:subject:date:message-id :user-agent:mime-version; bh=zv/C8DeWVk+OPvSc+mshKtVR8zP7oVW8/6sVp7u2OyA=; b=iaWB6XiMxnCrVLU7JsPeFH2YU4qH7n1ZndMtESQ7KGD7NdyBPTo2RzmtuxyaiMqIqn S5gf5A/KC6m+35yY1pyy6WbL+YwGdxFuBIIvVr+KTbAal1+sGcD9WrI5xER5lRTobr4U 4abe8VVzBBG/E546Oa48QRSVS/noXzjHgmhZC1hZRt3WpGdDAtV7bRyim9CHeW8CbA/K wV7iZYYgTjC0w+K1UHrZ2lxGLUHs6Yhad58k46o91aq298PBknXEc/ZdBENjCBVy9BrF llXo/A1ydEEFmSrWbpEvzdlFmwHHyyBJfrvrGaBEzlU8CIvI4Y06nmGzPDjFtWfYVJUv JShg== X-Gm-Message-State: AHPjjUiJdyXxUlFU74n7wT/Y3VqFslLGqv0Ocnin5Gx/R8yUj3r/3f6/ Um72keBkdQ/GUSV5wLMNjUK4mWKAxb0= X-Google-Smtp-Source: AOwi7QBRU/fJYlj5Dr2j33mTj0hlZkKgi3cmw+uZ6QC8crtMQ7sz7P/RFTBQGgfaoUyFJ3WbFE48aQ== X-Received: by 10.28.45.5 with SMTP id t5mr3699949wmt.108.1505910472267; Wed, 20 Sep 2017 05:27:52 -0700 (PDT) Received: from localhost (92.40.248.127.threembb.co.uk. [92.40.248.127]) by smtp.gmail.com with ESMTPSA id l15sm1739298wrl.47.2017.09.20.05.27.51 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 20 Sep 2017 05:27:51 -0700 (PDT) From: Richard Sandiford To: gcc-patches@gcc.gnu.org Mail-Followup-To: gcc-patches@gcc.gnu.org, richard.sandiford@linaro.org Subject: Add copy_rtx call to RTL loop unroller Date: Wed, 20 Sep 2017 13:27:49 +0100 Message-ID: <87377h1rne.fsf@linaro.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 This is needed if the step is an unshared constant, like many (const ...)s are. Without this patch, libgfortran would fail to build for SVE. Tested on aarch64-linux-gnu, x86_64-linux-gnu and powerpc64le-linus-gnu. OK to install? Richard 2017-09-20 Richard Sandiford Alan Hayward David Sherwood gcc/ * loop-unroll.c (split_iv): Call copy_rtx on the step. Index: gcc/loop-unroll.c =================================================================== --- gcc/loop-unroll.c 2017-08-30 12:13:52.715828832 +0100 +++ gcc/loop-unroll.c 2017-09-20 13:26:14.451718893 +0100 @@ -1731,7 +1731,8 @@ split_iv (struct iv_to_split *ivts, rtx_ else { incr = simplify_gen_binary (MULT, mode, - ivts->step, gen_int_mode (delta, mode)); + copy_rtx (ivts->step), + gen_int_mode (delta, mode)); expr = simplify_gen_binary (PLUS, GET_MODE (ivts->base_var), ivts->base_var, incr); }