Strength reduction optimizes by replacing expensive operations with cheaper ones, where the cost factor is either execution time or code size. Examples include replacing multiplication and division by constant powers of two with left or right shifts.
Note:
The Compiler can only replace a division by two with a shift operation when the target division is implemented such that -1/2 == -1, or the dividend is unsigned. Negative values produce different results. The Compiler can use a shift when the C source code already contains a shift, or the value to be shifted is unsigned.