[PATCH] D120559: [flang] Lower integer comparison operation

Valentin Clement via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 25 06:39:40 PST 2022


clementval marked an inline comment as done.
clementval added inline comments.


================
Comment at: flang/lib/Lower/ConvertExpr.cpp:363
+  template <typename OpTy>
+  mlir::Value createCompareOp(mlir::arith::CmpIPredicate pred,
+                              const ExtValue &left, const ExtValue &right) {
----------------
rovka wrote:
> Nit: Why is this a template if it takes a CmpIPredicate? Can we use anything other than CmpIOp with a CmpIPredicate?
Yes `mlir::arith::CmpFOp` and `fir::CmpcOp` operations will use that. 


================
Comment at: flang/test/Lower/integer-operations.f90:72
+! CHECK-LABEL:add6_test
+INTEGER(4) FUNCTION add6_test(x0, x1)
+INTEGER(4) :: x0
----------------
rovka wrote:
> I don't mind more tests, but where these supposed to be in a different patch? :)
I don't mind sending them as a separate patch. They were bundled together in fir-dev so for simplicity. 


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D120559/new/

https://reviews.llvm.org/D120559



More information about the llvm-commits mailing list