[SelectionDAG] Handle big endian target BITCAST in computeKnownBits()
authorJonas Paulsson <paulsson@linux.vnet.ibm.com>
Sat, 17 Mar 2018 08:04:00 +0000 (08:04 +0000)
committerJonas Paulsson <paulsson@linux.vnet.ibm.com>
Sat, 17 Mar 2018 08:04:00 +0000 (08:04 +0000)
commite9f7fa83d54cbb77e48b26685433a6777f613017
tree6686462d667bf92cde58071ccc0e694e516f8e2a
parent6b9bb5e1c25acef752b53d170b23759ac1e1d40f
[SelectionDAG]  Handle big endian target BITCAST in computeKnownBits()

The BITCAST handling in computeKnownBits() previously only worked for little
endian.

This patch reverses the iteration over elements for a big endian target which
allows this to work in this case also.

SystemZ test case.

Review: Eli Friedman
https://reviews.llvm.org/D44249

llvm-svn: 327764
llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
llvm/test/CodeGen/SystemZ/dag-combine-03.ll [new file with mode: 0644]