On Tue, 18 Dec 2018, Andi Kleen wrote: > > Yes, take g++.dg/tree-prof/morefunc.C as an example: > > - int i; > > - for (i = 0; i < 1000; i++) > > + int i, j; > > + for (i = 0; i < 1000000; i++) > > + for (j = 0; j < 50; j++) > > g += tc->foo(); > > if (g<100) g++; > > } > > @@ -27,8 +28,9 @@ void test1 (A *tc) > > static __attribute__((always_inline)) > > void test2 (B *tc) > > { > > - int i; > > + int i, j; > > for (i = 0; i < 1000000; i++) > > + for (j = 0; j < 50; j++) > > > > I have to increase loop count like this to get stable pass on my > > machine. The original count (1000) is too small to be sampled. > > IIRC It was originally higher, but people running on slow simulators > complained, > so it was reduced. Perhaps we need some way to detect in the test suite > that the test runs on a real CPU.
Doesn't check_effective_target_simulator work here? See e.g. libstdc++-v3/testsuite/25_algorithms/heap/moveable2.cc for an example. brgds, H-P