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 rtl-optimization/66048] [i386] ICE in create_pre_exit when both AVX and MPX are used


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66048

--- Comment #2 from Ilya Enkovich <ienkovich at gcc dot gnu.org> ---
(In reply to UroÅ Bizjak from comment #1)
> There is a *very* picky assert in mode-switching.c that otherwise allows
> various exceptions when expected sequence:
> 
> (set (reg X) ...)
> 
> (use (reg X))

With MPX we have multiple (use (reg X)) and only the last one is examined. It
is always the one created for bounds.  Simple swap makes it work.  With this
patch test passes:

--- a/gcc/function.c
+++ b/gcc/function.c
@@ -5224,8 +5224,8 @@ diddle_return_value_1 (void (*doit) (rtx, void *), void
*arg, rtx outgoing)
 void
 diddle_return_value (void (*doit) (rtx, void *), void *arg)
 {
-  diddle_return_value_1 (doit, arg, crtl->return_rtx);
   diddle_return_value_1 (doit, arg, crtl->return_bnd);
+  diddle_return_value_1 (doit, arg, crtl->return_rtx);
 }

 static void

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