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/71779] [5/6/7 regression] isl miscompiled with -mabi=ilp32


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

--- Comment #16 from Bernd Edlinger <bernd.edlinger at hotmail dot de> ---
Alternative patch, that looks like it fixes this issue (but not the other bug).

Note: it generates one instruction more than the first patch, thus
paradoxical subregs trigger at least one other bug, and are harder
to optimize than zero extend.


Index: emit-rtl.c
===================================================================
--- emit-rtl.c  (revision 238815)
+++ emit-rtl.c  (working copy)
@@ -1155,7 +1155,7 @@ set_reg_attrs_from_value (rtx reg, rtx x)
         || (GET_CODE (x) == SUBREG && subreg_lowpart_p (x)))
     {
 #if defined(POINTERS_EXTEND_UNSIGNED)
-      if (((GET_CODE (x) == SIGN_EXTEND && POINTERS_EXTEND_UNSIGNED)
+      if (((GET_CODE (x) != ZERO_EXTEND && POINTERS_EXTEND_UNSIGNED)
           || (GET_CODE (x) != SIGN_EXTEND && ! POINTERS_EXTEND_UNSIGNED))
          && !targetm.have_ptr_extend ())
        can_be_reg_pointer = false;


Andreas, can you confirm that the isl-code is working with
this patch too?


Thanks
Bernd.

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