third_party_benchmark/test
Roman Lebedev f92903cc53
Iteration counts should be uint64_t globally. (#817)
This is a shameless rip-off of https://github.com/google/benchmark/pull/646
I did promise to look into why that proposed PR was producing
so much worse assembly, and so i finally did.

The reason is - that diff changes `size_t` (unsigned) to `int64_t` (signed).

There is this nice little `assert`:
7a1c370283/include/benchmark/benchmark.h (L744)
It ensures that we didn't magically decide to advance our iterator
when we should have finished benchmarking.

When `cached_` was unsigned, the `assert` was `cached_ UGT 0`.
But we only ever get to that `assert` if `cached_ NE 0`,
and naturally if `cached_` is not `0`, then it is bigger than `0`,
so the `assert` is tautological, and gets folded away.

But now that `cached_` became signed, the assert became `cached_ SGT 0`.
And we still only know that `cached_ NE 0`, so the assert can't be
optimized out, or at least it doesn't currently.

Regardless of whether or not that is a bug in itself,
that particular diff would have regressed the normal 64-bit systems,
by halving the maximal iteration space (since we go from unsigned counter
to signed one, of the same bit-width), which seems like a bug.
And just so it happens, fixing *this* bug, fixes the other bug.

This produces fully (bit-by-bit) identical state_assembly_test.s
The filecheck change is actually needed regardless of this patch,
else this test does not pass for me even without this diff.
2019-05-13 12:33:11 +03:00
..
AssemblyTests.cmake split_list is not defined for assembly tests (#595) 2018-05-14 15:02:49 +01:00
basic_test.cc Iteration counts should be uint64_t globally. (#817) 2019-05-13 12:33:11 +03:00
benchmark_gtest.cc Negative ranges #762 (#787) 2019-03-26 10:50:53 +00:00
benchmark_name_gtest.cc BENCHMARK_CAPTURE() and Complexity() - naming problem (#761) 2019-03-17 16:38:51 +03:00
benchmark_test.cc Allow AddRange to work with int64_t. (#548) 2018-04-03 23:12:47 +01:00
BUILD Add benchmark_main target. (#601) 2018-05-25 11:18:58 +01:00
clobber_memory_assembly_test.cc Add tests to verify assembler output -- Fix DoNotOptimize. (#530) 2018-03-23 16:10:47 -06:00
CMakeLists.txt CMake: codedrop of googletest cmake magic from me (#809) 2019-04-30 13:36:29 +03:00
commandlineflags_gtest.cc Add command line flags tests (#793) 2019-04-17 17:08:52 +01:00
complexity_test.cc Iteration counts should be uint64_t globally. (#817) 2019-05-13 12:33:11 +03:00
cxx03_test.cc Iteration counts should be uint64_t globally. (#817) 2019-05-13 12:33:11 +03:00
diagnostics_test.cc Refactor most usages of KeepRunning to use the perfered ranged-for. (#459) 2017-10-17 12:17:02 -06:00
display_aggregates_only_test.cc Track two more details about runs - the aggregate name, and run name. (#675) 2018-09-13 15:08:15 +03:00
donotoptimize_assembly_test.cc Add tests to verify assembler output -- Fix DoNotOptimize. (#530) 2018-03-23 16:10:47 -06:00
donotoptimize_test.cc Fix uninitialized warning (#560) 2018-03-25 20:05:31 +01:00
filter_test.cc Refactor most usages of KeepRunning to use the perfered ranged-for. (#459) 2017-10-17 12:17:02 -06:00
fixture_test.cc Enforce using a semicolon after BENCHMARK_MAIN to remove compiler warnings (#495) 2017-12-03 18:45:07 -07:00
internal_threading_test.cc Add process_time for better OpenMP and user-managed thread timing 2019-04-09 13:01:33 +01:00
link_main_test.cc Add benchmark_main target. (#601) 2018-05-25 11:18:58 +01:00
map_test.cc Allow AddRange to work with int64_t. (#548) 2018-04-03 23:12:47 +01:00
memory_manager_test.cc [JSON] add threads and repetitions to the json output (#748) 2019-03-26 09:53:07 +00:00
multiple_ranges_test.cc Negative ranges #762 (#787) 2019-03-26 10:50:53 +00:00
options_test.cc Negative ranges #762 (#787) 2019-03-26 10:50:53 +00:00
output_test_helper.cc Print at least three significant digits for times. (#701) 2018-12-13 22:49:21 -05:00
output_test.h *Display* aggregates only. (#665) 2018-09-12 16:26:17 +03:00
register_benchmark_test.cc Track two more details about runs - the aggregate name, and run name. (#675) 2018-09-13 15:08:15 +03:00
report_aggregates_only_test.cc Track two more details about runs - the aggregate name, and run name. (#675) 2018-09-13 15:08:15 +03:00
reporter_output_test.cc escape special chars in csv and json output. (#802) 2019-04-19 18:47:25 +01:00
skip_with_error_test.cc Track two more details about runs - the aggregate name, and run name. (#675) 2018-09-13 15:08:15 +03:00
state_assembly_test.cc Iteration counts should be uint64_t globally. (#817) 2019-05-13 12:33:11 +03:00
statistics_gtest.cc (clang-)format all the things (#610) 2018-06-01 11:14:19 +01:00
string_util_gtest.cc Fix signed vs unsigned comparisons in string_util unit tests (#742) 2018-12-10 10:24:22 +00:00
templated_fixture_test.cc (clang-)format all the things (#610) 2018-06-01 11:14:19 +01:00
user_counters_tabular_test.cc [JSON] add threads and repetitions to the json output (#748) 2019-03-26 09:53:07 +00:00
user_counters_test.cc [JSON] add threads and repetitions to the json output (#748) 2019-03-26 09:53:07 +00:00
user_counters_thousands_test.cc [JSON] add threads and repetitions to the json output (#748) 2019-03-26 09:53:07 +00:00