[flang] Lower logical comparison and logical operations
authorValentin Clement <clementval@gmail.com>
Fri, 25 Feb 2022 20:05:09 +0000 (21:05 +0100)
committerValentin Clement <clementval@gmail.com>
Fri, 25 Feb 2022 20:05:44 +0000 (21:05 +0100)
commita7ac120a9ad784998a5527fc0a71b2d0fd55eccb
treec6ecb152a3a55f9e21d8bdac546c9c5e1c4d6202
parent98813e365c23c297ef64e4d9cb59cd86eb81ce3c
[flang] Lower logical comparison and logical operations

This handles the lowering of the logical comparison
to `arith.cmpi` operation. The logical operations `.OR.`, `.AND.`
and `.NOT.` are lowered to `arith.ori`, `arith.andi` and `arith.xori`

This patch is part of the upstreaming effort from fir-dev branch.

Depends on D120559

Reviewed By: schweitz, rovka

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

Co-authored-by: Eric Schweitz <eschweitz@nvidia.com>
Co-authored-by: Jean Perier <jperier@nvidia.com>
flang/lib/Lower/ConvertExpr.cpp
flang/test/Lower/logical-operations.f90 [new file with mode: 0644]