[Flang] Lower the trim intrinsic
authorKiran Chandramohan <kiran.chandramohan@arm.com>
Thu, 17 Mar 2022 12:33:53 +0000 (12:33 +0000)
committerKiran Chandramohan <kiran.chandramohan@arm.com>
Thu, 17 Mar 2022 12:36:56 +0000 (12:36 +0000)
commit2cdf5ef1362d422b4d9d3053dc6e789e188d80af
treee238dc12498ca07ea3dd58f946fea80f01a5dd16
parent5be0f0c83d39310d1c6c078ec5b0731c48d34080
[Flang] Lower the trim intrinsic

The trim intrinsic removes trailing blank spaces from a string. The
intrinsic is lowered to a runtime call.

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: jeanPerier

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

Co-authored-by: Jean Perier <jperier@nvidia.com>
Co-authored-by: Valentin Clement <clementval@gmail.com>
Co-authored-by: Eric Schweitz <eschweitz@nvidia.com>
flang/lib/Lower/IntrinsicCall.cpp
flang/test/Lower/Intrinsics/trim.f90 [new file with mode: 0644]