This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]