From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45092) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZKhn-0007OT-P0 for qemu-devel@nongnu.org; Tue, 08 Sep 2015 11:21:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZZKhk-0004S9-FX for qemu-devel@nongnu.org; Tue, 08 Sep 2015 11:21:07 -0400 Received: from mail-pa0-x231.google.com ([2607:f8b0:400e:c03::231]:34892) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZKhk-0004Rv-9E for qemu-devel@nongnu.org; Tue, 08 Sep 2015 11:21:04 -0400 Received: by pacfv12 with SMTP id fv12so129659300pac.2 for ; Tue, 08 Sep 2015 08:21:03 -0700 (PDT) Sender: Richard Henderson References: <1441216660-8717-1-git-send-email-rth@twiddle.net> <1441216660-8717-6-git-send-email-rth@twiddle.net> <55EE6F99.9040309@twiddle.net> From: Richard Henderson Message-ID: <55EEFCDB.7050705@twiddle.net> Date: Tue, 8 Sep 2015 08:20:59 -0700 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 05/11] target-arm: Implement ccmp branchless List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: QEMU Developers On 09/08/2015 01:19 AM, Peter Maydell wrote: > The tcg common code isn't smart enough to notice it only > needs to calculate not(t1) once ? Correct, we do no value numbering or cse. > In the overwhelmingly common case (x86 tcg backend) > we would save an insn every time, right? Yes. It all depends on what value is used for NZCV, of course. Thankfully we *do* do dead code elimination, which is why I unconditionally compute both T1 and T2, and let them be deleted should they be unused. > I wouldn't bother to make the front-end generate different > code for the backend does/doesn't have andc situations, > certainly. I'll mock it up and see how much duplication there is. And also check it out on a Haswell host, which does have andc. r~