From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1251) id 6B9D93858C83; Wed, 11 Jan 2023 16:55:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6B9D93858C83 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1673456158; bh=EtXugjKmeTaoa6v+clsAXTBTiL13xcJE5c7rgw4OKmc=; h=From:To:Subject:Date:From; b=o7W8pBonkbKINdH0wFqW7FUsLYo223R07WWbrn7/q1wWAFShkaN6l4jkJ04fNDSdr 6ui5IXr/vHYPzp1/eaOL1ir6Z0EQqeif9Eyja86hAN70rgyj/9Ovipb+DFP9FmmJ71 YF7e+rSqh2OOkjz+k52vAyZop3xw090C1UWtanOs= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Roger Sayle To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-5111] PR tree-optimization/71343: Value number X<<2 as X*4. X-Act-Checkin: gcc X-Git-Author: Roger Sayle X-Git-Refname: refs/heads/master X-Git-Oldrev: c7279270a2deda81eaeba37a87d721bee0ed6004 X-Git-Newrev: 98837d6e79dd27c15f5218f3f1ddf838cda4796c Message-Id: <20230111165558.6B9D93858C83@sourceware.org> Date: Wed, 11 Jan 2023 16:55:58 +0000 (GMT) List-Id: https://gcc.gnu.org/g:98837d6e79dd27c15f5218f3f1ddf838cda4796c commit r13-5111-g98837d6e79dd27c15f5218f3f1ddf838cda4796c Author: Roger Sayle Date: Wed Jan 11 16:54:58 2023 +0000 PR tree-optimization/71343: Value number X<<2 as X*4. This patch is the second part of a fix for PR tree-optimization/71343, that implements Richard Biener's suggestion of using tree-ssa's value numbering instead of match.pd. The change is that when assigning a value number for the expression X< gcc/ChangeLog PR tree-optimization/71343 * tree-ssa-sccvn.cc (visit_nary_op) : Make the value number of the expression X << C the same as the value number for the multiplication X * (1<