This is an archive of the discontinued LLVM Phabricator instance.

[DAGCombiner] Fold together mul and shl when both are by a constant
ClosedPublic

Authored by john.brawn on Aug 20 2015, 8:46 AM.

Details

Summary

This is intended to improve code generation for GEPs, as the index value is shifted by the element size and in GEPs of multi-dimensional arrays the index of higher dimensions is multiplied by the lower dimension size.

Diff Detail

Repository
rL LLVM

Event Timeline

john.brawn updated this revision to Diff 32700.Aug 20 2015, 8:46 AM
john.brawn retitled this revision from to [DAGCombiner] Fold together mul and shl when both are by a constant.
john.brawn updated this object.
john.brawn set the repository for this revision to rL LLVM.
john.brawn added a subscriber: llvm-commits.
jmolloy accepted this revision.Aug 20 2015, 9:51 AM
jmolloy added a reviewer: jmolloy.
jmolloy added a subscriber: jmolloy.

Hi John,

This LGTM.

James

This revision is now accepted and ready to land.Aug 20 2015, 9:51 AM
This revision was automatically updated to reflect the committed changes.