This is an archive of the discontinued LLVM Phabricator instance.

[InstCombine] Precommit tests for D105088

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



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

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).


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


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


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

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

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

Sure! My name and email id are: Krishna Kariya <>.

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.