This is an archive of the discontinued LLVM Phabricator instance.

[CVP] Add tests for lshr width reduction
AbandonedPublic

Authored by lebedev.ri on May 19 2018, 4:45 PM.

Details

Summary

Counter-proposal to D46760.
I suppose, continuation of D44102.

If the second operand of udiv/urem is power-of-two,
instcombine will transform that into lshr/and,
and CVP does not handle them.
https://godbolt.org/g/hhT9bc

Diff Detail

Repository
rL LLVM

Event Timeline

lebedev.ri created this revision.May 19 2018, 4:45 PM

Revisited tests, added phase ordering test.

Add one more run-line to the phase ordering test to demonstrate
how instcombine is able to cleanup after CVP.

Add tests with large bitwidth / shifts.

I skimmed quickly through these tests and they seem fine to me (at least, they document the current state).
I'd like to give @reames or @anna an opportunity to comment as they've working in this area more than I did lately.

lebedev.ri abandoned this revision.Jun 21 2019, 8:52 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 21 2019, 8:52 AM