This is an archive of the discontinued LLVM Phabricator instance.

[X86] combineCMP - peek through zero-extensions for X86cmp(zext(x0),0) zero tests (PR38960)
ClosedPublic

Authored by RKSimon on Mar 11 2022, 8:58 AM.

Details

Summary

If we're comparing a value against zero, strip away any zero-extension and perform the comparison on the pre-extended value

Diff Detail

Event Timeline

RKSimon created this revision.Mar 11 2022, 8:58 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 11 2022, 8:58 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
RKSimon requested review of this revision.Mar 11 2022, 8:58 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 11 2022, 8:58 AM
pengfei accepted this revision.Mar 11 2022, 8:45 PM

Good point!

This revision is now accepted and ready to land.Mar 11 2022, 8:45 PM
This revision was landed with ongoing or failed builds.Mar 13 2022, 4:39 AM
This revision was automatically updated to reflect the committed changes.