From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24153 invoked by alias); 17 Jan 2014 01:18:30 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 24124 invoked by uid 48); 17 Jan 2014 01:18:26 -0000 From: "mikeb01 at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/58928] Different results from gcc when -mlzcnt is used Date: Fri, 17 Jan 2014 01:18:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 4.8.2 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: mikeb01 at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-01/txt/msg01794.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58928 --- Comment #2 from Michael Barker --- > Hope helps What hardware platform are you testing on? I'm running on Ivy Bridge: Intel(R) Xeon(R) CPU E5620 @2.40GHz Could you put the assembler that you see on the ticket: With -mlzcnt: 0000000000400580 : 400580: 55 push %rbp 400581: 48 89 e5 mov %rsp,%rbp 400584: 48 89 7d e8 mov %rdi,-0x18(%rbp) 400588: 48 8b 45 e8 mov -0x18(%rbp),%rax 40058c: 48 89 45 f8 mov %rax,-0x8(%rbp) 400590: f3 48 0f bd 45 f8 lzcnt -0x8(%rbp),%rax 400596: 48 98 cltq 400598: 5d pop %rbp 400599: c3 retq Without -mlzcnt: 0000000000400580 : 400580: 55 push %rbp 400581: 48 89 e5 mov %rsp,%rbp 400584: 48 89 7d e8 mov %rdi,-0x18(%rbp) 400588: 48 8b 45 e8 mov -0x18(%rbp),%rax 40058c: 48 89 45 f8 mov %rax,-0x8(%rbp) 400590: 48 0f bd 45 f8 bsr -0x8(%rbp),%rax 400595: 48 83 f0 3f xor $0x3f,%rax 400599: 48 98 cltq 40059b: 5d pop %rbp 40059c: c3 retq