This is an archive of the discontinued LLVM Phabricator instance.

[InstCombine] Add (vXi1 trunc(lshr(x,c))) -> icmp_eq(and(x,c')) support for non-uniform vectors
ClosedPublic

Authored by RKSimon on Jul 2 2020, 4:14 AM.

Details

Summary

As noted on PR46531, we were only performing this transform on uniform vectors as we were using the m_APInt pattern matcher to extract the shift amount.

Diff Detail

Event Timeline

RKSimon created this revision.Jul 2 2020, 4:14 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 2 2020, 4:14 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
lebedev.ri accepted this revision.Jul 2 2020, 4:58 AM

LG
May be good to have tests with undef, although manual checking suggests it's undef-proof.

This revision is now accepted and ready to land.Jul 2 2020, 4:58 AM
RKSimon edited the summary of this revision. (Show Details)Jul 2 2020, 8:53 AM
This revision was automatically updated to reflect the committed changes.