[Bug target/59163] [4.8/4.9 Regression] program compiled with g++ -O3 segfaults

ubizjak at gmail dot com gcc-bugzilla@gcc.gnu.org
Fri Nov 29 19:56:00 GMT 2013


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59163

--- Comment #14 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to Uroš Bizjak from comment #13)
> (In reply to Jakub Jelinek from comment #12)
> > Created attachment 31332 [details]
> > gcc49-pr59163.patch
> > 
> > So like this?
> 
> Yes, with adjusted comment in ix86_legitimate_combined_insn.
> 
> IIRC, unaligned moves won't be propagated during or after reload, so it
> looks to me that the approach is correct.

Running the testsuite with your patch applied exposed a minor problem:

FAIL: gcc.target/i386/sse-1.c scan-assembler-not movaps

movlps/movhps and movlpd/movhpd can also handle unaligned operands (please see
ix86_expand_vector_move_misalign). We should simply tag instructions that
operate on unaligned operands (attribute type = ssemovu) and check type
attribute instead.

The proposed approach would mean to change all scheduler and attribute
calculation checks from "ssemov" to "ssemov,ssemovu", but this would be a
simple mechanical change.


More information about the Gcc-bugs mailing list