re PR target/70799 (STV pass does not convert DImode shifts)
authorUros Bizjak <ubizjak@gmail.com>
Sun, 23 Apr 2017 07:25:30 +0000 (09:25 +0200)
committerUros Bizjak <uros@gcc.gnu.org>
Sun, 23 Apr 2017 07:25:30 +0000 (09:25 +0200)
commit2eb8a34363025d04482a798dec1c885e1e3a3803
treeb5da08f631dab69d29e95297a4be8d4f01c857d2
parenta1687c59a105c3131f0f33be8cae4f0a7ea660cc
re PR target/70799 (STV pass does not convert DImode shifts)

PR target/70799
* config/i386/i386.c (dimode_scalar_to_vector_candidate_p)
<case ASHIFT, case LSHIFTRT>: Also consider variable shifts.
Check "XEXP (src, 1)" operand here.
<case PLUS, case MINUS, case IOR, case XOR, case AND>:
Check "XEXP (src, 1)" operand here.
(dimode_scalar_chain::make_vector_copies): Detect count register
of a shift instruction.  Zero extend count register from QImode
to DImode to satisfy vector shift pattern count operand predicate.
Substitute vector shift count operand with a DImode copy.
(dimode_scalar_chain::convert_reg): Ditto, zero-extend from
vector register.

testsuite/ChangeLog:

PR target/70799
* gcc.target/i186/pr70799-4.c: New test.

From-SVN: r247082
gcc/ChangeLog
gcc/config/i386/i386.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/pr70799-4.c [new file with mode: 0644]