[all-commits] [llvm/llvm-project] 68efe6: [flang] Fix ICE for sqrt(0.0) evaluation
FruitClover via All-commits
all-commits at lists.llvm.org
Thu Apr 14 02:53:59 PDT 2022
Author: Mike Kashkarov <fruitclover at gmail.com>
Date: 2022-04-14 (Thu, 14 Apr 2022)
[flang] Fix ICE for sqrt(0.0) evaluation
During real range reduction to [0.5, 4) with
SQRT(2**(2a) * x) = SQRT(2**(2a)) * SQRT(x) = 2**a * SQRT(x)
we fall into inf. recursion if IsZero() == true.
Explicitly handle SQRT(0.0) instead of additional checks during folding. Also
add helpers for +0.0/-0.0 generation to clean up a bit.
Reviewed By: klausler
Differential Revision: https://reviews.llvm.org/D123131
More information about the All-commits