decompress: conditionally remove bmi2 from context

Use an helper function, which will just return 0 in case
the feature is disabled.
Allows constant propagation and removal of dead code.
This commit is contained in:
Norbert Lange
2021-09-26 14:41:37 +02:00
parent 02296cac82
commit 0d45540695
4 changed files with 23 additions and 11 deletions
+1 -1
View File
@@ -177,7 +177,7 @@ FORCE_NOINLINE size_t ZSTD_decodeLiteralsHeader(ZSTD_DCtx* dctx, void const* src
dctx->entropy.hufTable,
istart+lhSize, litCSize,
dctx->workspace, sizeof(dctx->workspace),
dctx->bmi2);
ZSTD_DCtx_get_bmi2(dctx));
#else
return HUF_readDTableX2_wksp(
dctx->entropy.hufTable,