This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/59163] [4.8/4.9 Regression] program compiled with g++ -O3 segfaults
- From: "ubizjak at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 29 Nov 2013 12:57:46 +0000
- Subject: [Bug target/59163] [4.8/4.9 Regression] program compiled with g++ -O3 segfaults
- Auto-submitted: auto-generated
- References: <bug-59163-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59163
--- Comment #6 from UroÅ Bizjak <ubizjak at gmail dot com> ---
I think that we should disallow tie of TImode with 128bit vector modes due to
different alignment requirements. Integer register pairs can load unaligned
TImode without problems, while unaligned TImode will crash SSE insns.
Following patch fixes the problem:
Index: config/i386/i386.c
===================================================================
--- config/i386/i386.c (revision 205509)
+++ config/i386/i386.c (working copy)
@@ -35237,6 +35237,7 @@ ix86_modes_tieable_p (enum machine_mode mode1, enu
return (GET_MODE_SIZE (mode1) == 32
&& ix86_hard_regno_mode_ok (FIRST_SSE_REG, mode1));
if (GET_MODE_SIZE (mode2) == 16
+ && !(mode1 == TImode || mode2 == TImode)
&& ix86_hard_regno_mode_ok (FIRST_SSE_REG, mode2))
return (GET_MODE_SIZE (mode1) == 16
&& ix86_hard_regno_mode_ok (FIRST_SSE_REG, mode1));
However, it needs some refinements for AVX.