This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PR target/84089] handle E_VOIDmode in PA's base14_operand
- From: Aldy Hernandez <aldyh at redhat dot com>
- To: dave dot anglin at bell dot net
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 1 Feb 2018 12:20:39 -0500
- Subject: [PR target/84089] handle E_VOIDmode in PA's base14_operand
- Authentication-results: sourceware.org; auth=none
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;
}