Displaying 1 result from an estimated 1 matches for "combinerepeatedfpdivisor".
Did you mean:
combinerepeatedfpdivisors
2017 Mar 06
2
combineRepeatedFPDivisors design questions
...32_t b = 0;
uint32_t a = 0;
while (b < 0xFFFFFFFF) {
if ((uint64_t)(b / c) % 2 == 0)
a++;
b++;
}
return a;
}
The culprit here is the division, which is not hoisted out of the loop and replaced with a multiplication by a reciprocal. From what I understand the current implementation of combineRepeatedFPDivisors responsible for floating point division conversion does that given that the following preconditions are met:
— unsafe math optimisations are enabled;
— the amount of the divisions by the same divisor in a single basic block is above the threshold (2 for x86-64).
According to the IR the divisions...