diff mbox series

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

Message ID 90c32ca3-75c6-ceda-becf-37b4f4cfbebf@redhat.com
State New
Headers show
Series [PR,target/84089] handle E_VOIDmode in PA's base14_operand | expand

Commit Message

Aldy Hernandez Feb. 1, 2018, 5:20 p.m. UTC
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

Comments

John David Anglin Feb. 1, 2018, 5:45 p.m. UTC | #1
On 2018-02-01 12:20 PM, Aldy Hernandez wrote:
> Perhaps someone with access to a PA box can run further tests.
I have a couple of tests running.

Thanks,
Dave
diff mbox series

Patch

            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;
     }