https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82405
--- Comment #8 from Antony Polukhin <antoshkka at gmail dot com> --- Yes, in the isolated test case constants are first: static inline double eval_square2(double r) { return 4 * r * r; } static inline double eval_circle2(double r) { return 3.1415 * r * r; } double test_switch_native_slow(int shape, double r) { if (shape == 123) return eval_circle2(r); else return eval_square2(r); } So multiplying r at the beginning is not good.