This is an archive of the discontinued LLVM Phabricator instance.

GlobalISel: Fix lowering of G_CTLZ/G_CTTZ
ClosedPublic

Authored by arsenm on Feb 6 2020, 6:19 PM.

Details

Summary

The type passed to lower was invalid, so I'm not sure how this was
even working before. The source and destination type also do not have
to match, so make sure to use the right ones.

Diff Detail

Event Timeline

arsenm created this revision.Feb 6 2020, 6:19 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 6 2020, 6:19 PM
nhaehnle removed a subscriber: nhaehnle.Feb 7 2020, 1:44 AM
Petar.Avramovic accepted this revision.Feb 7 2020, 3:44 AM

LGTM

llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
4113–4114

long line

This revision is now accepted and ready to land.Feb 7 2020, 3:44 AM
llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-cttz.mir