[Flang] Lower the spacing, rrspacing intrinsics
authorKiran Chandramohan <kiran.chandramohan@arm.com>
Thu, 17 Mar 2022 13:47:28 +0000 (13:47 +0000)
committerKiran Chandramohan <kiran.chandramohan@arm.com>
Fri, 18 Mar 2022 09:18:42 +0000 (09:18 +0000)
commit022b05941ef4d9ee50d4a7a29b0537b562624b16
tree34f5ab84e52dec663e81aeac0d801e0810a55699
parentf96428e16de2181b414e39234b4d366c83cc52a8
[Flang] Lower the spacing, rrspacing intrinsics

These intrinsics returns the distance to the nearest real number and
their reciprocal. They are lowered to flang runtime calls.

This is part of the upstreaming effort from the fir-dev branch in [1].
[1] https://github.com/flang-compiler/f18-llvm-project

Reviewed By: clementval

Differential Revision: https://reviews.llvm.org/D121832

Co-authored-by: Mark Leair <leairmark@gmail.com>
Co-authored-by: Eric Schweitz <eschweitz@nvidia.com>
Co-authored-by: Jean Perier <jperier@nvidia.com>
flang/lib/Lower/IntrinsicCall.cpp
flang/test/Lower/Intrinsics/rrspacing.f90 [new file with mode: 0644]
flang/test/Lower/Intrinsics/spacing.f90 [new file with mode: 0644]