optimize redundant frounds in -O3