https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70840
Bug ID: 70840 Summary: revisit reassoc handling of pow / powi, amend match.pd for powi Product: gcc Version: 6.0 Status: UNCONFIRMED Keywords: missed-optimization Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: rguenth at gcc dot gnu.org Target Milestone: --- Currently reassoc builds powi from repeated multiplications guarded with -funsafe-math-optimizations where later expansion of powi is safe for fp-contract != off. The acceptable_pow_call cases are globally guarded with flag_unsafe_math_optimizations as well but POWI is always safe and only POW has to be guarded with flag_unsafe_math_optimizations. match.pd has quite some patterns involving POW but none involving POWI. At least for flag_unsafe_math_optimizations POWI can be treated as POW and whether we emit POW or POWI does not matter for flag_unsafe_math_optimziations.