This is an archive of the discontinued LLVM Phabricator instance.

Add test cases to prepare for the optimization that simplifies Add with remainder expressions as operands.
ClosedPublic

Authored by bixia on Apr 24 2018, 8:42 AM.

Details

Summary

Add test cases to prepare for the new optimization that Simplifies
integer add expression X % C0 + (( X / C0 ) % C1) * C0 to X % (C0 * C1).

Diff Detail

Event Timeline

bixia created this revision.Apr 24 2018, 8:42 AM
bixia updated this revision to Diff 143762.Apr 24 2018, 9:10 AM
  • Use instnamer to fix the name of the tests.

Updating D46017: Add test cases to prepare for the optimization that simplifies Add with

remainder expressions as operands.

sanjoy accepted this revision.Apr 24 2018, 11:24 AM

lgtm modulo the one nit

Let me know if I should commit this for you.

test/Transforms/InstCombine/add4.ll
3

You can probably remove these two lines.

This revision is now accepted and ready to land.Apr 24 2018, 11:24 AM
This revision was automatically updated to reflect the committed changes.