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

Artur Pilipenko via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 14 13:29:04 PST 2016


apilipenko added a comment.

@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.


https://reviews.llvm.org/D26149





More information about the llvm-commits mailing list