-
Notifications
You must be signed in to change notification settings - Fork 34
Open
Description
s258 contains this inside the inner loop
if (a[i] > 0.)
{
s = d[i] * d[i];
}
BUT a[i] > 0. is always true due to the initialization of a array which does:
if (!strcmp(name, "s258")) {
set_1d_array(a, LEN_1D, any,frac);
set_1d_array does this for frac (SET1D_RECIP_IDX):
for (int i = 0; i < length; i++) {
arr[i] = 1. / (real_t) (i+1);
}
If the compiler decides not to generate a conditional move, the HW might be able to predict the branch correctly through the loop and that is cheating what the benchmark is trying to benchmark here.
Metadata
Metadata
Assignees
Labels
No labels