Fix big-endian handling of integer-to-vector bitcasts in InstCombine
authorRichard Sandiford <rsandifo@linux.vnet.ibm.com>
Mon, 12 Aug 2013 07:26:09 +0000 (07:26 +0000)
committerRichard Sandiford <rsandifo@linux.vnet.ibm.com>
Mon, 12 Aug 2013 07:26:09 +0000 (07:26 +0000)
commit23331c30aefae840f55b52e2ed343117e5599682
tree73a7efd31690e737e3bdbda68ac8d567a07b49ec
parent5e4b95b3fe908f89aa512b6e9921fe49aadd759b
Fix big-endian handling of integer-to-vector bitcasts in InstCombine

These functions used to assume that the lsb of an integer corresponds
to vector element 0, whereas for big-endian it's the other way around:
the msb is in the first element and the lsb is in the last element.

Fixes MultiSource/Benchmarks/mediabench/gsm/toast for z.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188155 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/InstCombine/InstCombineCasts.cpp
test/Transforms/InstCombine/bitcast-bigendian.ll