[PATCH] D113976: [fir] Add fir.cmpc conversion

Diana Picus via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 16 02:29:43 PST 2021


rovka created this revision.
rovka added reviewers: clementval, awarzynski, kiranchandramohan, schweitz, jeanPerier, AlexisPerry.
rovka added a project: Flang.
Herald added subscribers: mehdi_amini, jdoerfert.
rovka requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

This patch adds the codegen for fir.cmpc. The real and imaginary parts
are extracted and compared separately. For the .EQ. predicate the
results are AND'd, for the .NE. predicate the results are OR'd, and for
other predicates we keep only the result on the real parts.

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

Co-authored-by: Eric Schweitz <eschweitz at nvidia.com>
Co-authored-by: Jean Perier <jperier at nvidia.com>


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D113976

Files:
  flang/lib/Optimizer/CodeGen/CodeGen.cpp
  flang/test/Fir/convert-to-llvm.fir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D113976.387541.patch
Type: text/x-patch
Size: 7075 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211116/2d7c8924/attachment.bin>


More information about the llvm-commits mailing list