From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40974) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z0dHD-00017d-U7 for qemu-devel@nongnu.org; Thu, 04 Jun 2015 18:06:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z0dHA-0002YY-Kw for qemu-devel@nongnu.org; Thu, 04 Jun 2015 18:06:15 -0400 Received: from mail-vn0-x233.google.com ([2607:f8b0:400c:c0f::233]:43656) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z0dHA-0002YR-Ff for qemu-devel@nongnu.org; Thu, 04 Jun 2015 18:06:12 -0400 Received: by vnbg7 with SMTP id g7so842147vnb.10 for ; Thu, 04 Jun 2015 15:06:11 -0700 (PDT) Sender: Richard Henderson Message-ID: <5570CBCF.6060601@twiddle.net> Date: Thu, 04 Jun 2015 15:06:07 -0700 From: Richard Henderson MIME-Version: 1.0 References: <1433447607-31184-1-git-send-email-aurelien@aurel32.net> <1433447607-31184-5-git-send-email-aurelien@aurel32.net> <5570BE19.7090000@twiddle.net> <20150604214420.GA6313@aurel32.net> In-Reply-To: <20150604214420.GA6313@aurel32.net> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v1 4/5] tcg/optimize: fold constant test in tcg_opt_gen_mov List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Aurelien Jarno Cc: qemu-devel@nongnu.org On 06/04/2015 02:44 PM, Aurelien Jarno wrote: > On 2015-06-04 14:07, Richard Henderson wrote: >> I think you should check for copies first, and only then do the TEMP_CONST >> check. That way we get to remove an op. > > If the state of a temp is TCG_TEMP_CONST, it can't be a copy as its > state should be TCG_TEMP_COPY for that. Ah, true. I'd forgotten how that copy ring was represented. The existing patch is fine, if you prefer. r~