[SVE][CodeGen] Fix DAGCombiner::ForwardStoreValueToDirectLoad for scalable vectors
authorDavid Sherwood <david.sherwood@arm.com>
Thu, 3 Sep 2020 07:28:57 +0000 (08:28 +0100)
committerDavid Sherwood <david.sherwood@arm.com>
Tue, 6 Oct 2020 07:04:03 +0000 (08:04 +0100)
commit4ed47d50ea819fc3cf7341e86e947fef920743df
tree5e29106d31ae87129ebe3514f388937b030c0156
parent70d9dc867417ac63fe280ab145776f75a9487f0f
[SVE][CodeGen] Fix DAGCombiner::ForwardStoreValueToDirectLoad for scalable vectors

In DAGCombiner::ForwardStoreValueToDirectLoad I have fixed up some
implicit casts from TypeSize -> uint64_t and replaced calls to
getVectorNumElements() with getVectorElementCount(). There are some
simple cases of forwarding that we can definitely support for
scalable vectors, i.e. when the store and load are both scalable
vectors and have the same size. I have added tests for the new
code paths here:

  CodeGen/AArch64/sve-forward-st-to-ld.ll

Differential Revision: https://reviews.llvm.org/D87098
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/test/CodeGen/AArch64/sve-forward-st-to-ld.ll [new file with mode: 0644]