Skip to content

[flang] fix evaluate::Expr hashing in lowering #95079

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 12, 2024

Conversation

jeanPerier
Copy link
Contributor

Fixes #61610.

@jeanPerier jeanPerier requested a review from vzakhari June 11, 2024 07:24
@llvmbot llvmbot added flang Flang issues not falling into any other category flang:fir-hlfir labels Jun 11, 2024
@llvmbot
Copy link
Member

llvmbot commented Jun 11, 2024

@llvm/pr-subscribers-flang-fir-hlfir

Author: None (jeanPerier)

Changes

Fixes #61610.


Full diff: https://github.com/llvm/llvm-project/pull/95079.diff

1 Files Affected:

  • (modified) flang/include/flang/Lower/Support/Utils.h (+1-1)
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) {

@jeanPerier jeanPerier merged commit 1754651 into llvm:main Jun 12, 2024
10 checks passed
@jeanPerier jeanPerier deleted the jpr-fix-61610 branch June 12, 2024 07:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flang:fir-hlfir flang Flang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[flang] Same condtions appear as operands of LAnd. Copy-pasted code. Maybe the second should be isEqual(x.upper(), y.upper()).
3 participants