From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2140) id 37C113858425; Fri, 23 Dec 2022 00:58:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 37C113858425 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1671757104; bh=YMh6kCCdqCLda/eX+CW6vgfsZbRohrjUTrLeFwxsh9A=; h=From:To:Subject:Date:From; b=bsGu64Yfwr/ykrH8ilx2aVhXRe97TCy1LrU4yrNWs8u+0L2a6p+mvzYYA1BfYmWYf QeeAGkpU9ku71rzzRghVmtudfAHxORXT1EOANUD7usrLmyRtuWtgIeKnYLjOkt4CVh Mx6ZbRdqsJybe9nwlWkJrKnH58UlyvxZyCYYQg1o= 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: ff6ccdebd02c42840a19922ec5a3accab8b62d84 X-Git-Newrev: ec1ebb00d52fc27b0217a86c391ec84716a5488a Message-Id: <20221223005824.37C113858425@sourceware.org> Date: Fri, 23 Dec 2022 00:58:24 +0000 (GMT) List-Id: https://gcc.gnu.org/g:ec1ebb00d52fc27b0217a86c391ec84716a5488a commit ec1ebb00d52fc27b0217a86c391ec84716a5488a 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