[all-commits] [llvm/llvm-project] a7bb8e: [Flang] Change fir.divc to perform library call ra...
SachaBallantyne via All-commits
all-commits at lists.llvm.org
Tue Apr 4 09:09:36 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: a7bb8e273f433cceeb547e87d04114178573496a
https://github.com/llvm/llvm-project/commit/a7bb8e273f433cceeb547e87d04114178573496a
Author: Sacha Ballantyne <Sacha.Ballantyne at arm.com>
Date: 2023-04-04 (Tue, 04 Apr 2023)
Changed paths:
M flang/lib/Optimizer/CodeGen/CodeGen.cpp
M flang/test/Fir/convert-to-llvm.fir
Log Message:
-----------
[Flang] Change fir.divc to perform library call rather than generate inline operations.
Currently `fir.divc` is always lowered to a sequence of llvm operations to perform complex division, however this causes issues for extreme values when the calculations overflow. While this behaviour would be fine at -Ofast, this is currently the default at all levels.
This patch changes `fir.divc` to lower to a library call instead, except for when KIND=3 as there is no appropriate library call for this case.
Reviewed By: vzakhari
Differential Revision: https://reviews.llvm.org/D145808
More information about the All-commits
mailing list