Page MenuHomePhabricator

[AMDGPU] Convert shl (add) into add (shl)
ClosedPublic

Authored by rampitec on May 23 2017, 12:36 AM.

Details

Summary

shl (or|add x, c2), c1 => or|add (shl x, c1), (c2 << c1)
This allows to fold a constant into an address in some cases as
well as to eliminate second shift if the expression is used as
an address and second shift is a result of a GEP.

Diff Detail

Repository
rL LLVM

Event Timeline

rampitec created this revision.May 23 2017, 12:36 AM
vpykhtin accepted this revision.May 23 2017, 4:15 AM

LGTM.

This revision is now accepted and ready to land.May 23 2017, 4:15 AM
This revision was automatically updated to reflect the committed changes.