[AArch64] Fix a silent codegen fault in BUILD_VECTOR lowering.
authorJames Molloy <james.molloy@arm.com>
Fri, 17 Oct 2014 17:06:31 +0000 (17:06 +0000)
committerJames Molloy <james.molloy@arm.com>
Fri, 17 Oct 2014 17:06:31 +0000 (17:06 +0000)
commitf497d5511d1aff061c3af95b13796f8a4b05a4d0
treeb75871ef972ad46173228992a510b7f2ac1782c5
parentff73fc9547e927a07468f7ee34aac022b522452e
[AArch64] Fix a silent codegen fault in BUILD_VECTOR lowering.

We should be talking about the number of source elements, not the number of destination elements, given we know at this point that the source and dest element numbers are not the same.

While we're at it, avoid writing to std::vector::end()...

Bug found with random testing and a lot of coffee.

llvm-svn: 220051
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
llvm/test/CodeGen/AArch64/aarch64-wide-shuffle.ll [new file with mode: 0644]