This is an archive of the discontinued LLVM Phabricator instance.

[X86] For Silvermont CPU use 16-bit division instead of 64-bit for small positive numbers
ClosedPublic

Authored by volkalexey on Oct 23 2014, 7:37 AM.

Details

Summary

This patch enables use of smaller 16-bit division instead of 64-bit for positive numbers less than 65536.
This is profitable for some tests since on Silvermont 64-bit division is quite slow.

Diff Detail

Repository
rL LLVM

Event Timeline

volkalexey updated this revision to Diff 15328.Oct 23 2014, 7:37 AM
volkalexey retitled this revision from to [X86] For Silvermont CPU use 16-bit division instead of 64-bit for small positive numbers.
volkalexey updated this object.
volkalexey edited the test plan for this revision. (Show Details)
volkalexey added a reviewer: nadav.
volkalexey set the repository for this revision to rL LLVM.
volkalexey added subscribers: Unknown Object (MLST), zinovy.nis.

Test case?

Thanks,
-Quentin

volkalexey updated this revision to Diff 16334.Nov 18 2014, 6:45 AM

I created a test case. It's also included case for Atom processors.

Hi Alexey,

Could you update the test case to check that the lowering is actually correct, not just that we are/aren’t generating the related instruction?

Thanks,
-Quentin

volkalexey updated this revision to Diff 16431.Nov 20 2014, 7:58 AM

I added additional checks to test case.

qcolombet accepted this revision.Nov 20 2014, 11:10 AM
qcolombet added a reviewer: qcolombet.

Thanks Alexey.

LGTM.
Q.

This revision is now accepted and ready to land.Nov 20 2014, 11:10 AM
Diffusion closed this revision.Nov 21 2014, 3:20 AM
Diffusion updated this revision to Diff 16477.

Closed by commit rL222521 (authored by volkalex).