This is an archive of the discontinued LLVM Phabricator instance.

[AArch64][GISel] Legalize non-power-of-two G_CTLZ
ClosedPublic

Authored by lenary on Apr 4 2023, 3:47 AM.

Details

Summary

This fixes a crash found in PR61549, and adds test coverage for other
sizes that cannot be selected.

Diff Detail

Event Timeline

lenary created this revision.Apr 4 2023, 3:47 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 4 2023, 3:47 AM
lenary requested review of this revision.Apr 4 2023, 3:47 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 4 2023, 3:47 AM

Can you add a test for, say, s8 to show that small power-of-2s should still be widened to s32?

lenary added a comment.Apr 5 2023, 4:22 AM

Can you add a test for, say, s8 to show that small power-of-2s should still be widened to s32?

Ack, will do. I will also reformat the code to remove the spurious formatting changes

lenary updated this revision to Diff 511048.Apr 5 2023, 4:39 AM
lenary edited the summary of this revision. (Show Details)
lenary updated this revision to Diff 511083.Apr 5 2023, 6:29 AM
This revision is now accepted and ready to land.Apr 5 2023, 10:39 AM

I will fix the legalizer-info-validation.mir failure when I land this (imminently).

This revision was landed with ongoing or failed builds.Apr 12 2023, 9:39 AM
This revision was automatically updated to reflect the committed changes.