[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 12:57:00 GMT 2013
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.
More information about the Gcc-bugs
mailing list