This is an archive of the discontinued LLVM Phabricator instance.

Use SystemZ NILL instruction instead of NILF where possible
ClosedPublic

Authored by colpell on Jun 24 2016, 8:22 AM.

Details

Summary

SystemZ shift instructions only use the last 6 bits of the shift amount. When the result of an AND operation is used as a shift amount, this means that we can use the NILL instruction (which operates on the last 16 bits) rather than NILF (which operates on the last 32 bits) for a 16-bit savings in instruction size.

Diff Detail

Event Timeline

colpell updated this revision to Diff 61795.Jun 24 2016, 8:22 AM
colpell retitled this revision from to Use SystemZ NILL instruction instead of NILF where possible.
colpell updated this object.
colpell added a reviewer: uweigand.
colpell added a subscriber: llvm-commits.
uweigand edited edge metadata.Jun 27 2016, 6:39 AM

I guess this could be done for rotate as well. Otherwise, LGTM.

colpell updated this revision to Diff 62122.Jun 28 2016, 11:48 AM
colpell edited edge metadata.

Added the same NILF -> NILL transformation for rotations.

uweigand accepted this revision.Jun 28 2016, 12:28 PM
uweigand edited edge metadata.

LGTM, thanks.

This revision is now accepted and ready to land.Jun 28 2016, 12:28 PM
This revision was automatically updated to reflect the committed changes.