Page MenuHomePhabricator

[SVE][CodeGen] Fix DAGCombiner::ForwardStoreValueToDirectLoad for scalable vectors

Authored by david-arm on Sep 3 2020, 10:24 AM.



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:


Diff Detail

Event Timeline

david-arm created this revision.Sep 3 2020, 10:24 AM
efriedma added inline comments.Sep 3 2020, 12:29 PM

Add comments to explain these bailouts?


Probably you could make this math work for scalable vectors, but it probably doesn't really matter at the moment.

c-rhodes added inline comments.Sep 4 2020, 2:51 AM

should this be comparing LdMemSize?

david-arm updated this revision to Diff 289910.Sep 4 2020, 3:48 AM
  • Added comments to explain reasons for new bail-outs.
david-arm marked 2 inline comments as done.Sep 4 2020, 3:49 AM

I also changed StMemSize to LdMemSize as @c-rhodes suggested.

c-rhodes accepted this revision.Sep 4 2020, 4:53 AM


This revision is now accepted and ready to land.Sep 4 2020, 4:53 AM