[fir] Add complex operations conversion from FIR LLVM IR
authorValentin Clement <clementval@gmail.com>
Tue, 9 Nov 2021 13:15:07 +0000 (14:15 +0100)
committerValentin Clement <clementval@gmail.com>
Tue, 9 Nov 2021 13:17:34 +0000 (14:17 +0100)
commit7b5132dae8e0d0645aacfb41c09cbc3ef33a330e
tree30d607e046497a36cbab256aeb3e1810866de869
parent116dc70cf3717eab495d80e4d78afe02fe6285ba
[fir] Add complex operations conversion from FIR LLVM IR

This patch add conversion for primitive operations on complex types.
- fir.addc
- fir.subc
- fir.mulc
- fir.divc
- fir.negc

This adds also the type conversion for !fir.complex<KIND> type.

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

This patch was updated to avoid failure on windows buildbot.
Flang codegen does not support windows target so we force the test
to use a known target instead.

Reviewed By: kiranchandramohan, rovka

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

Co-authored-by: Jean Perier <jperier@nvidia.com>
Co-authored-by: Eric Schweitz <eschweitz@nvidia.com>
flang/include/flang/Optimizer/CodeGen/CGPasses.td
flang/lib/Optimizer/CodeGen/CodeGen.cpp
flang/lib/Optimizer/CodeGen/Target.cpp
flang/lib/Optimizer/CodeGen/Target.h
flang/lib/Optimizer/CodeGen/TypeConverter.h
flang/test/Fir/convert-to-llvm.fir
flang/test/Fir/types-to-llvm.fir