Unverified Commit 31505c4f authored by Peter Klausler's avatar Peter Klausler Committed by GitHub
Browse files

[flang] Fix spurious overflow warning folding exponentiation by integ… (#88188)

…er powers

The code that folds exponentiation by an integer power can report a
spurious overflow warning because it calculates one last unnecessary
square of the base value. 10.**(+/-32) exposes the problem -- the value
of 10.**64 is calculated but not needed. Rearrange the implementation to
only calculate squares that are necessary.

Fixes https://github.com/llvm/llvm-project/issues/88151.
parent cb1b846e
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment