From: Alexandre Oliva Date: Thu, 29 Dec 2022 17:32:53 +0000 (-0300) Subject: ssa-loop-niter: skip caching of null operands X-Git-Tag: upstream/13.1.0~2322 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e2535c6035270c8b46491c6d33285ac29362bdf7;p=platform%2Fupstream%2Fgcc.git ssa-loop-niter: skip caching of null operands When a TREE_OPERAND is NULL, do not cache it. for gcc/ChangeLog * tree-ssa-loop-niter.cc (expand_simple_operands): Refrain from caching NULL TREE_OPERANDs. --- diff --git a/gcc/tree-ssa-loop-niter.cc b/gcc/tree-ssa-loop-niter.cc index fece876..1764564 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