[PowerPC] Fix issue where vsrq is given incorrect shift vector
authorStefan Pintilie <stefanp@ca.ibm.com>
Tue, 5 Jan 2021 20:42:53 +0000 (14:42 -0600)
committerStefan Pintilie <stefanp@ca.ibm.com>
Wed, 6 Jan 2021 11:56:09 +0000 (05:56 -0600)
commitcb0c034edc98b32691ea25b70fc3cc2e9d6d2a86
tree8cd66dcdc5a988c29ac9299a46e28cc703579aba
parent816dba48af49050625adec6ed696983618346b11
[PowerPC] Fix issue where vsrq is given incorrect shift vector

The new Power10 instruction vsrq was being given the wrong shift vector.
The original code assumed that the shift would be found in bits 121 to 127.
This is not correct. The shift is found in bits 57 to 63.
This can be fixed by swaping the first and second double words.

Reviewed By: nemanjai, #powerpc

Differential Revision: https://reviews.llvm.org/D94113
llvm/lib/Target/PowerPC/PPCInstrPrefix.td
llvm/test/CodeGen/PowerPC/p10-vector-shift.ll