This is an archive of the discontinued LLVM Phabricator instance.

GlobalISel: Fix narrowing of G_CTLZ/G_CTTZ
ClosedPublic

Authored by arsenm on Feb 7 2020, 9:25 AM.

Details

Summary

The result type is separate from the source type.

Diff Detail

Event Timeline

arsenm created this revision.Feb 7 2020, 9:25 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 7 2020, 9:25 AM
arsenm updated this revision to Diff 243210.Feb 7 2020, 10:07 AM

Fix mips tests

Petar.Avramovic accepted this revision.Feb 7 2020, 10:32 AM

LGTM

llvm/unittests/CodeGen/GlobalISel/LegalizerHelperTest.cpp
101

This does not seem to have any effect but shouldn't second type be s32 since narrow scalar uses s32?

This revision is now accepted and ready to land.Feb 7 2020, 10:32 AM
arsenm closed this revision.Feb 9 2020, 3:39 PM
arsenm marked an inline comment as done.
llvm/unittests/CodeGen/GlobalISel/LegalizerHelperTest.cpp
101

The legalizer info isn't really needed at all in any of these tests since the action is explicitly called