[PATCH] D26149: [DAGCombiner] Match load by bytes idiom and fold it into a single load

Hal Finkel via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 21 12:17:16 PST 2016


hfinkel added a comment.

In https://reviews.llvm.org/D26149#594859, @apilipenko wrote:

> @hfinkel, this problem is more hypothetical than practical. For the cases we are interested in BaseIndexOffset logic is smart enough to look through non-combined addresses. Although triggering load combine might enable handling of more complex patterns.
>
> As a possible fix we can add some logic in visitLoad which checks if the load can be a part of the load combine pattern. It should be fairly easy since all the nodes in the pattern must have only one use and this use must be on of few known nodes (or, shl, zext). If the load can be a part of the pattern visitLoad should add the potential root of the pattern ("or" node) to the work list. But this is definitely a separate improvement for this optimization.


Okay; makes sense to me.


https://reviews.llvm.org/D26149





More information about the llvm-commits mailing list