[flang-commits] [PATCH] D113976: [fir] Add fir.cmpc conversion
Kiran Chandramohan via Phabricator via flang-commits
flang-commits at lists.llvm.org
Tue Nov 16 02:46:42 PST 2021
kiranchandramohan added inline comments.
================
Comment at: flang/lib/Optimizer/CodeGen/CodeGen.cpp:503
+ mlir::MLIRContext *ctxt = cmp.getContext();
+ mlir::Type eleTy = convertType(getComplexEleTy(cmp.lhs().getType()));
+ mlir::Type resTy = convertType(cmp.getType());
----------------
rovka wrote:
> I modified this to use getComplexEleTy instead of [[ https://github.com/flang-compiler/f18-llvm-project/blob/a2233bff405a91e8e6af23214eab2df42f2a69f9/flang/lib/Optimizer/CodeGen/CodeGen.cpp#L794 | reconstructing ]] it. Hope it's fine.
The previous code kind of assumes the complex types are of FIR type. The new code accommodates both (FIR and mlir complex).
If the conversion supports both then we should have a test for mlir complex as well.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D113976/new/
https://reviews.llvm.org/D113976
More information about the flang-commits
mailing list