From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14345 invoked by alias); 16 Feb 2015 19:44:54 -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 14248 invoked by uid 48); 16 Feb 2015 19:44:50 -0000 From: "hjl.tools at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/65028] [5 Regression] 450.soplex in SPEC CPU 2006 is miscompiled Date: Mon, 16 Feb 2015 19:44:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: ipa X-Bugzilla-Version: 5.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: hjl.tools at gmail dot com X-Bugzilla-Status: REOPENED X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: jamborm at gcc dot gnu.org X-Bugzilla-Target-Milestone: 5.0 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: 2015-02/txt/msg01825.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65028 --- Comment #13 from H.J. Lu --- (In reply to Jan Hubicka from comment #12) > I agree it is probably differnt issue, but lets see. It would help if you > can look at the backtract and see if there is a problem between > local/non-local calling conventions. I.e. function called with parameters > passed on stack and consuming them in registers. X32 passes parameters in registers, just like x86-64. I got (gdb) disass Dump of assembler code for function operator*(ggSpectrum const&, ggSpectrum const&): 0x00420780 <+0>: movups (%esi),%xmm0 0x00420784 <+4>: mov %rdi,%rax 0x00420787 <+7>: movups 0x10(%esi),%xmm1 => 0x0042078c <+12>: mulps (%edx),%xmm0 ^^^^^ It isn't aligned to 32 bytes. 0x00420790 <+16>: mulps 0x10(%edx),%xmm1 0x00420795 <+21>: movups %xmm0,(%edi) 0x00420799 <+25>: movups %xmm1,0x10(%edi) 0x0042079e <+30>: retq End of assembler dump. (gdb) p/x $edx $2 = 0xffffcc48 (gdb) f 1 #1 0x004452d4 in __base_ctor (v=..., z=..., y=..., x=..., bPrimary=..., gPrimary=..., rPrimary=..., this=0xffffbf60) at ./ggPhotometer.h:53 53 colorMatrix[0][0] = (cieX * rPrimary).area(); (gdb) p cieX $3 = {data = {0.146008939, 0.279831082, 0.0505069345, 0.202513069, 0.729846954, 0.957131386, 0.414069265, 0.0614523999}} (gdb) p rPrimary $4 = (const struct ggSpectrum &) @0xffffcc48: {data = {0, 0, 0, 0, 0.0899555609, 0.550044477, 0.959999979, 1}} (gdb) ... 0x004452c4 <+1620>: mov (%esp),%rdx 0x004452c9 <+1625>: mov %r15,%rsi 0x004452cc <+1628>: mov %r14,%rdi 0x004452cf <+1631>: callq 0x420780 => 0x004452d4 <+1636>: mov %r14,%rdi ... Breakpoint 1, 0x004452cf in __base_ctor (v=..., z=..., y=..., x=..., bPrimary=..., gPrimary=..., rPrimary=..., this=0xffffbf60) at ./ggPhotometer.h:53 53 colorMatrix[0][0] = (cieX * rPrimary).area(); (gdb) p/x $rdi $6 = 0xffffbf40 (gdb) p/x $rsi $7 = 0xffffbfa8 (gdb) p/x $rdx $8 = 0xffffcc48 (gdb) p this $9 = (struct ggPhotometer * const) 0xffffbf60 (gdb) p &cieX $10 = (struct ggSpectrum *) 0xffffbfa8 (gdb) p/x &rPrimary $11 = 0xffffcc48 (gdb) p/x $pc $13 = 0x4452cf (gdb) p rPrimary $1 = (const struct ggSpectrum &) @0xffffcc48: {data = {0, 0, 0, 0, 0.0899555609, 0.550044477, 0.959999979, 1}} (gdb) Why do we think rPrimary is 16-byte aligned when it is only 8-byte aligned?