[DAGCombiner] Bugfix in isAlias().
authorJonas Paulsson <paulsson@linux.vnet.ibm.com>
Wed, 22 Nov 2017 08:58:30 +0000 (08:58 +0000)
committerJonas Paulsson <paulsson@linux.vnet.ibm.com>
Wed, 22 Nov 2017 08:58:30 +0000 (08:58 +0000)
commit181e260e32b6a45a72e51e1fd4a96c4c73181be5
treed43ca1f64d2549e41b87f8683b998b34f018039e
parentee74044f9301a6c658e1435b9cf5c05aa1284002
[DAGCombiner]  Bugfix in isAlias().

Since i1 is a legal type, this:

  NumBytes = Op1->getMemoryVT().getSizeInBits() >> 3;

is wrong and should be instead

  NumBytes = Op0->getMemoryVT().getStoreSize();

There seems to be more places where this should be fixed outside DAGCombiner.

Review: Hal Finkel
https://bugs.llvm.org/show_bug.cgi?id=35366

llvm-svn: 318824
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/test/CodeGen/SystemZ/DAGCombiner_isAlias.ll [new file with mode: 0644]