This is an archive of the discontinued LLVM Phabricator instance.

[PowerPC] Implement the vclz instructions for POWER8
ClosedPublic

Authored by kbarton on Feb 4 2015, 7:28 PM.

Details

Summary

Add the vector count leading zeros instruction for byte, halfword, word, and doubleword sizes.
This is a fairly straightforward addition after the changes made for vpopcnt:

  1. Add the correct definitions for the various instructions in PPCInstrAltivec.td
  2. Make the CTLZ operation legal on vector types when using P8Altivec in PPCISelLowering.cpp

Diff Detail

Event Timeline

kbarton updated this revision to Diff 19377.Feb 4 2015, 7:28 PM
kbarton retitled this revision from to [PowerPC] Implement the vclz instructions for POWER8.
kbarton updated this object.
kbarton edited the test plan for this revision. (Show Details)
kbarton added reviewers: hfinkel, wschmidt, nemanjai, seurer.
kbarton added a subscriber: Unknown Object (MLST).
hfinkel accepted this revision.Feb 4 2015, 10:27 PM
hfinkel edited edge metadata.

LGTM.

This revision is now accepted and ready to land.Feb 4 2015, 10:27 PM
wschmidt closed this revision.Feb 5 2015, 7:27 AM
wschmidt edited edge metadata.

Committed on Kit's behalf as r228301.

Kit, I think it's time you requested commit-after-approval authority. Let me know if you have any questions about the process.

Bill