Page MenuHomePhabricator

Add a fast path to alignTo.

Authored by ruiu on Oct 6 2016, 1:04 PM.



If an alignment is a power of two, we can avoid integer division,
and it is very likely to happen.

Event Timeline

ruiu updated this revision to Diff 73841.Oct 6 2016, 1:04 PM
ruiu retitled this revision from to Add a fast path to alignTo..
ruiu updated this object.
ruiu added reviewers: rafael, davide.
ruiu added a subscriber: llvm-commits.
grimar added a subscriber: grimar.Oct 7 2016, 1:52 AM
davide edited edge metadata.Dec 13 2016, 7:08 PM

Not sure I really like this one for two reasons.

  1. I profiled llvm/lld to death and this pretty much never shows up in a profile.
  2. I think after inlining instcombine/instsimplify should handle this case.

In other words, I propose abandoning this one and opening an llvm bug to get this fixed (if you still care).

ruiu abandoned this revision.Dec 13 2016, 7:25 PM

Sorry not to explicitly abandon. Closing it now.

In D25344#621824, @ruiu wrote:

Sorry not to explicitly abandon. Closing it now.

No problem at all.
I opened to keep track of the missing transform