rs6000: Make the ctr* patterns allow ints in vector regs (PR71763)
commitd490b07a44ccab92a9338e977b586373760450b3
authorsegher <segher@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 7 Jul 2016 03:09:03 +0000 (7 03:09 +0000)
committersegher <segher@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 7 Jul 2016 03:09:03 +0000 (7 03:09 +0000)
tree2de57a6ecd444e6768a4028bf841dbcf613dfea2
parent833ffaa7b971c8f60cbd779be55f8b5a68e22fb4
rs6000: Make the ctr* patterns allow ints in vector regs (PR71763)

Similar to PR70098, which is about integers in floating point registers,
we can have the completely analogous problem with vector registers as well
now that we allow integers in vector registers.  So, this patch solves it
in the same way.  This only works for targets with direct move.

To recap: register allocation can decide to put an integer mode value in
a floating point or vector register.  If that register is used in a bd*z
instruction, which is a jump instruction, reload can not do an output
reload on it (it does not do output reloads on any jump insns), so the
float or vector register will remain, and we have to allow it here or
recog will ICE.  Later on we will split this to valid instructions,
including a move from that fp/vec register to an int register; it is this
move that will still fail (PR70098) if we do not have direct move enabled.

PR target/70098
PR target/71763
* config/rs6000/rs6000.md (*ctr<mode>_internal1, *ctr<mode>_internal2,
*ctr<mode>_internal5, *ctr<mode>_internal6): Add *wi to the output
constraint.

gcc/testsuite/
PR target/70098
PR target/71763
* gcc.target/powerpc/pr71763.c: New file.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@238076 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/config/rs6000/rs6000.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/powerpc/pr71763.c [new file with mode: 0644]