From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2140) id A0BF538582A3; Fri, 23 Dec 2022 07:31:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A0BF538582A3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1671780687; bh=S4Y7+fkqnxTCOgj7nbFV/czriWoK+jfUZy4vWJA4X8U=; h=From:To:Subject:Date:From; b=g6BtgEZ9S+MYEY4SOgFMJd3UQ4zLtRGwGJxhCoSf+9fPN6t4qe6gaPTdI010jc55P vL1bxWfp//7T3+/WrhguU68VobPllZJLxW5EHtjCueX6fnfCzD3UkaMrNMM7ax8A2k iA6hk9x7Mrp587OUNKPA0Q4fMMNsE3rQPzHQ3X5o= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Alexandre Oliva To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/users/aoliva/heads/testme)] ssa-loop-niter: skip caching of null operands X-Act-Checkin: gcc X-Git-Author: Alexandre Oliva X-Git-Refname: refs/users/aoliva/heads/testme X-Git-Oldrev: eec9a98a337079636be2b8a9d39384e0395c3e23 X-Git-Newrev: 2c28594c0fb2a9cf1abff7d279aa1d40bbf3c006 Message-Id: <20221223073127.A0BF538582A3@sourceware.org> Date: Fri, 23 Dec 2022 07:31:27 +0000 (GMT) List-Id: https://gcc.gnu.org/g:2c28594c0fb2a9cf1abff7d279aa1d40bbf3c006 commit 2c28594c0fb2a9cf1abff7d279aa1d40bbf3c006 Author: Alexandre Oliva Date: Thu Dec 22 21:28:52 2022 -0300 ssa-loop-niter: skip caching of null operands Diff: --- gcc/tree-ssa-loop-niter.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gcc/tree-ssa-loop-niter.cc b/gcc/tree-ssa-loop-niter.cc index fece876099c..17645648326 100644 --- a/gcc/tree-ssa-loop-niter.cc +++ b/gcc/tree-ssa-loop-niter.cc @@ -2325,6 +2325,8 @@ expand_simple_operations (tree expr, tree stop, hash_map &cache) for (i = 0; i < n; i++) { e = TREE_OPERAND (expr, i); + if (!e) + continue; /* SCEV analysis feeds us with a proper expression graph matching the SSA graph. Avoid turning it into a tree here, thus handle tree sharing