This is the mail archive of the gcc-patches@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]

[PR target/84089] handle E_VOIDmode in PA's base14_operand


Before r196122, a VOIDmode would return the default value of false in base14_operand, but when S?mode and D?mode's were collapsed with the aforementioned patch, we started handling E_VOIDmode which has a size of 0. The zero is causes a division by zero in the PR's testcase.

Dave has suggested returning false for E_VOIDmode.

Having no access to a PA system, I haven't tested this other than visual inspection and making sure we don't ICE. However, since a VOID clearly causes a division by zero, we're not worse off than before :).

Perhaps someone with access to a PA box can run further tests.

In the meantime... committed to trunk.  Pre-approved by Dave.

Aldy
            PR target/84089
            * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.

diff --git a/gcc/config/pa/predicates.md b/gcc/config/pa/predicates.md
index 4600f988c87..cc2bffa0762 100644
--- a/gcc/config/pa/predicates.md
+++ b/gcc/config/pa/predicates.md
@@ -277,6 +277,9 @@
     case E_HImode:
       return true;
 
+    case E_VOIDmode:
+      return false;
+
     default:
       return (INTVAL (op) % GET_MODE_SIZE (mode)) == 0;
     }

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