From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28860 invoked by alias); 30 Jul 2004 18:11:35 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 28852 invoked by uid 48); 30 Jul 2004 18:11:34 -0000 Date: Fri, 30 Jul 2004 18:11:00 -0000 Message-ID: <20040730181134.28851.qmail@sourceware.org> From: "steven at gcc dot gnu dot org" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20040728170038.16797.steinmtz@us.ibm.com> References: <20040728170038.16797.steinmtz@us.ibm.com> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug tree-optimization/16797] Opportunity to remove unnecessary load instructions X-Bugzilla-Reason: CC X-SW-Source: 2004-07/txt/msg03602.txt.bz2 List-Id: ------- Additional Comments From steven at gcc dot gnu dot org 2004-07-30 18:11 ------- Interestingly, on AMD64 this test case doesn't even need a branch: foo: movq i(%rip), %rax # %rax <-- i sarq $52, %rax # %rax <-- (%rax >> 52) movq %rax, j(%rip) # j <-- %rax sarq $11, %rax # %rax <-- (%rax >> 11) andq $-10, %rax # %rax <-- (%rax & -10) addq $20, %rax # %rax <-- (%rax + 20) movq %rax, i(%rip) # i <-- %rax ret # return %eax -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16797