[all-commits] [llvm/llvm-project] 3502d3: [flang] Adjust transformational folding to match r...
Peter Klausler via All-commits
all-commits at lists.llvm.org
Wed May 1 14:06:54 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 3502d340c9276f1828da9db72f83e5e25b163b8b
https://github.com/llvm/llvm-project/commit/3502d340c9276f1828da9db72f83e5e25b163b8b
Author: Peter Klausler <35819229+klausler at users.noreply.github.com>
Date: 2024-05-01 (Wed, 01 May 2024)
Changed paths:
M flang/lib/Evaluate/fold-implementation.h
M flang/lib/Evaluate/fold-matmul.h
M flang/lib/Evaluate/fold-real.cpp
M flang/lib/Evaluate/fold-reduction.h
Log Message:
-----------
[flang] Adjust transformational folding to match runtime (#90132)
The transformational intrinsic functions MATMUL, DOT_PRODUCT, and NORM2
all involve summing up intermediate products into accumulators. In the
constant folding library, this is done with extended precision Kahan
summation for REAL and COMPLEX arguments, but in the runtime
implementations it is not, and this leads to discrepancies between
folded results and dynamic results.
Disable the use of Kahan summation in folding to resolve these
discrepancies, but don't discard the code, in case we want to add Kahan
summation in the runtime for some or all of these intrinsic functions.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list