[Bug tree-optimization/52395] New: [4.7 Regression] Alignment issue at O2
izamyatin at gmail dot com
gcc-bugzilla@gcc.gnu.org
Mon Feb 27 07:50:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52395
Bug #: 52395
Summary: [4.7 Regression] Alignment issue at O2
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: izamyatin@gmail.com
Created attachment 26759
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26759
Test case for the issue
I noticed that after the following commit
commit 25b3bbad6624357c1ac6a31e0be6fca37182fb78
Author: rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Fri Jan 27 14:56:54 2012 +0000
2012-01-27 Richard Guenther <rguenther@suse.de>
PR tree-optimization/50444
* tree-sra.c (build_ref_for_offset): Properly adjust the
MEM_REF type for unaligned accesses.
* gcc.dg/torture/pr50444.c: New testcase.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@183630
138bc75d-0d04-0410-961f-82ee72b054a4
alignment of some memory references was spoiled. For attached test case I see
following:
before commit (A32):
#(insn:TI 6 11 7 2 (set (mem:SF (reg/v/f:DI 5 di [orig:61 __x ] [61]) [2
__x_1(D)->re+0 S4 A32])
# (const_double:SF 0.0 [0x0.0p+0])) test.cpp:13 108 {*movsf_internal}
# (nil))
movl $0x00000000, (%rdi) # 6 *movsf_internal/5 [length = 16]
after commit (A8):
#(insn:TI 6 11 7 2 (set (mem:SF (reg/v/f:DI 5 di [orig:61 __x ] [61]) [2
__x_1(D)->re+0 S4 A8])
# (const_double:SF 0.0 [0x0.0p+0])) test.cpp:13 108 {*movsf_internal}
# (nil))
movl $0x00000000, (%rdi) # 6 *movsf_internal/5 [length = 16]
Compiled just with O2.
Originally I saw this after compilation of complex_io.cc from libstdc++-v3
More information about the Gcc-bugs
mailing list