[flang-commits] [flang] [flang] fix evaluate::Expr hashing in lowering (PR #95079)

via flang-commits flang-commits at lists.llvm.org
Tue Jun 11 00:24:58 PDT 2024


https://github.com/jeanPerier created https://github.com/llvm/llvm-project/pull/95079

Fixes https://github.com/llvm/llvm-project/issues/61610.

>From 19058b06d292345f3c6a3bd9198d219cdfecb790 Mon Sep 17 00:00:00 2001
From: Jean Perier <jperier at nvidia.com>
Date: Tue, 11 Jun 2024 00:21:55 -0700
Subject: [PATCH] [flang] fix evaluate::Expr hashing in lowering

---
 flang/include/flang/Lower/Support/Utils.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/flang/include/flang/Lower/Support/Utils.h b/flang/include/flang/Lower/Support/Utils.h
index 64641ab4b6ca1..e791f3dbb221a 100644
--- a/flang/include/flang/Lower/Support/Utils.h
+++ b/flang/include/flang/Lower/Support/Utils.h
@@ -502,7 +502,7 @@ class IsEqualEvaluateExpr {
     return std::visit(
                [&](const auto &p, const auto &q) { return isEqual(p, q); },
                x.parent(), y.parent()) &&
-           isEqual(x.lower(), y.lower()) && isEqual(x.lower(), y.lower());
+           isEqual(x.lower(), y.lower()) && isEqual(x.upper(), y.upper());
   }
   static bool isEqual(const Fortran::evaluate::StaticDataObject::Pointer &x,
                       const Fortran::evaluate::StaticDataObject::Pointer &y) {



More information about the flang-commits mailing list