0

Uses "#pragma GCC reset_options" to re-enable optimizations after ReduceLarge function

This ensures that compiler optimizations are restored to the state as it was before ReduceLarge function. Previous CL https://codereview.chromium.org/814273004 could have a possible side effect of enabling "tree-vectorize" optimizations for the rest of the file even when they were disabled in build settings.

BUG=439566

Review URL: https://codereview.chromium.org/819893002

Cr-Commit-Position: refs/heads/master@{#309537}
This commit is contained in:
varkha
2014-12-22 20:58:01 -08:00
committed by Commit bot
parent 6942bf25fa
commit b126eb8f93

@ -175,7 +175,8 @@ void ReduceLarge(FieldElement* out, LargeFieldElement* inptr) {
// TODO(wez): Remove this when crbug.com/439566 is fixed.
#if defined(__GNUC__) && !defined(__clang__)
#pragma GCC optimize("tree-vectorize")
// Reenable "tree-vectorize" optimization if it got disabled for ReduceLarge.
#pragma GCC reset_options
#endif
// Mul computes *out = a*b