This is an archive of the discontinued LLVM Phabricator instance.

[X86][BITREVERSE] Optimized bitreverse builtin for 8 bit scalar integer (PR31810)

Authored by kbelochapka on Jul 18 2017, 7:13 PM.



manually optimized code for 8 bit integer bit reverse builtin, instruction count reduced from 14 to 11, slight performance gain

Diff Detail

Event Timeline

kbelochapka created this revision.Jul 18 2017, 7:13 PM
kbelochapka retitled this revision from [X86][BITREVERSE] Optimized bitreverse builtin for 8 bit scalar integer to [X86][BITREVERSE] Optimized bitreverse builtin for 8 bit scalar integer (PR31810).Jul 18 2017, 7:17 PM
kbelochapka edited the summary of this revision. (Show Details)
kbelochapka added a reviewer: craig.topper.
RKSimon edited edge metadata.Jul 19 2017, 3:01 AM

The performance implications on PR31810 need to be settled before this can be taken any further


This is general legalization code - we should ensure that ISD::ROTL is legalorcustom before attempting this path, otherwise the additional shift/mask code will definitely be a regression. With that in place you can probably drop the VT.isScalarInteger() requirement.


Please use the script

kbelochapka abandoned this revision.Sep 15 2017, 2:54 PM

The performance measurement testing did not show any performance benefit for the proposed 8bit bit reversal intrinsic implementation over the existing one.