This is an archive of the discontinued LLVM Phabricator instance.

[InstCombine] Precommit tests for D105088
ClosedPublic

Authored by Krishnakariya on Jul 11 2021, 3:15 AM.

Details

Summary

I have added the test cases as discussed in D105088.

Diff Detail

Event Timeline

Krishnakariya created this revision.Jul 11 2021, 3:15 AM
Krishnakariya requested review of this revision.Jul 11 2021, 3:15 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 11 2021, 3:15 AM
nikic added inline comments.Jul 11 2021, 11:58 AM
llvm/test/Transforms/InstCombine/ptr-int-ptr-icmp.ll
39

As you can see, this test ends up being the same as the previous due to complexity canonicalization. You should replace %Y with an instruction rater than an argument to actually test the commuted variant. (grep "thwart complexity" and getComplexity for context).

50

It would be nice to pick more meaningful names for the tests, e.g. this could be integer_type_too_small.

Krishnakariya marked 2 inline comments as done.

Modified test3 and updated the names of unit tests.

nikic accepted this revision.Jul 12 2021, 9:20 AM

LGTM

This revision is now accepted and ready to land.Jul 12 2021, 9:20 AM

LGTM

Thanks.
I do not have commit access. Please commit this patch for me.

@Krishnakariya Could you please share Your Name <your@email.com> to use for the commit?

@Krishnakariya Could you please share Your Name <your@email.com> to use for the commit?

Sure! My name and email id are: Krishna Kariya <krishna17060@iiitd.ac.in>.

This revision was landed with ongoing or failed builds.Jul 13 2021, 11:35 AM
This revision was automatically updated to reflect the committed changes.