From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2140) id EA5423857C51; Fri, 23 Dec 2022 05:27:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EA5423857C51 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1671773242; bh=HH8YKqfeZFxoQDjwCb0C1XqAYmns4ihM7gLBNqFOUvg=; h=From:To:Subject:Date:From; b=SL4Pno0d+b5W7pKe40TLnVDfh9DfQu1GKE0slUbUdGx0fEdvGlguD28YrYCUT+dJz +IjnVUyILglYD0w+MtuizI/d/NQRge0DcwlfIMz2sx1M8gSResv+N9cdxv5sf1D9CZ 9gY8L3NzXFeA77UXOaLQF6cWvkFOgLJP9M9BMUjI= 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: 34f02f9ee78641ddfb4f750bc23ffa8570964f21 X-Git-Newrev: e4f1923faff9f88fa62df2baa500a5b6f4ca53c7 Message-Id: <20221223052722.EA5423857C51@sourceware.org> Date: Fri, 23 Dec 2022 05:27:22 +0000 (GMT) List-Id: https://gcc.gnu.org/g:e4f1923faff9f88fa62df2baa500a5b6f4ca53c7 commit e4f1923faff9f88fa62df2baa500a5b6f4ca53c7 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