From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 53967 invoked by alias); 3 Jul 2015 09:09:43 -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 53951 invoked by uid 48); 3 Jul 2015 09:09:40 -0000 From: "julia.koval at intel dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/66749] New: [4.9/5/6] gcc.target/i386/addr-sel-1.c fails to merge array index into one instruction with -m32 -mregparm=3 or with -miamcu Date: Fri, 03 Jul 2015 09:09:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 4.9.3 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: julia.koval at intel dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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: 2015-07/txt/msg00229.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66749 Bug ID: 66749 Summary: [4.9/5/6] gcc.target/i386/addr-sel-1.c fails to merge array index into one instruction with -m32 -mregparm=3 or with -miamcu Product: gcc Version: 4.9.3 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: julia.koval at intel dot com Target Milestone: --- The test tries to generate code for: return a[i+1] + b[i+1]; For -m32 gcc generates proper code: movl 4(%esp), %eax movsbl a+1(%eax), %ecx movsbl b+1(%eax), %eax addl %ecx, %eax However with -m32 -mregparm=3 the b value fails to be combined: movsbl a+1(%eax), %edx incl %eax movsbl b(%eax), %eax addl %edx, %eax The error also remains with -mregparm=1/2 or with -miamcu.