Hi Tim,
This is a revamp of [1].
That patch was rejected mainly because it lacked enough testing. I've added tests to cover all ModImmTypes and addressed the other minor points you mentioned there.
Notes:-
- The need to use rev64 instructions with big-endian vectors is documented at [2]
- Most ModImmTypes have a symmetric counter-part, and the lane reversal causes them to be encoded in that opposite pattern. A few ModImmTypes (7,8, 11, 12) do not have that property and gets pushed into memory. But this is irrelevant as far as correctness is concerned.
Thanks.
- Asiri
[1] http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20140714/226398.html
[2] http://llvm.org/docs/BigEndianNEON.html