<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/61610>61610</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[flang] Same condtions appear as operands of LAnd. Copy-pasted code. Maybe the second should be isEqual(x.upper(), y.upper()).
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
ustchcs-bugfinder
</td>
</tr>
</table>
<pre>
https://github.com/llvm/llvm-project/blob/08d094a0e457360ad8b94b017d2dc277e697ca76/flang/lib/Lower/IterationSpace.cpp#L451
Current code:
```
static bool isEqual(const Fortran::evaluate::Substring &x,
const Fortran::evaluate::Substring &y) {
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()); // ----> Same condition. May be the second should be x.upper()?
}
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUVMtu8jwQfZrJxiJyJjeyyIJCI_1S_1WfwDeIP7lx6ksLb__JSSnlU7soskCe8TnjOeMD816fJqV6qB-gPmQshtG6PvogRuE3PJ6OepLKZdzKSz-GMHsod4AD4HDSYYw8F_YFcDDm7fqzmZ39o0QAHLixHHCgW0m7ilFV1W3ZUCa3vKs4LVqJUmDbqqZrBWsbwOFo2HRKRDoBn-y7coDDf0E5FrSdnmcmVC7mGbB8quoC6AHobv3eR-fUFIiwUqVLrqmGfqxl6wMLWhBurSHaP75GZgC3wk4-kMG64NiUoOVOvTETWVDr7jlyH5yeTgSwOQPuVzby7ed3bBfAjkD78MHoVIhuIj7I9eyb9joAbr8tmIaGDdSHzx5YDDaxzoB7ch96_Sh0LXFrfzmc0lA-EGgPP_V3zmeWFE7XwS6BLv9EulQorRV-K3HOzTrKG_IucAX-BrLcdnmJZLPZbKB8JM_sRaW2pU6PJSf_swvhioRREa9SnPjRRiNT8JzHef6kK4dry0mA-6eTyb6UXdmxTPVF03ZVU9e4zca-Ko51UR-b6lhRykosKEdRSUoLUXYdV5nukWJJS0TaFEi3-bblsktZUTSsEw1UVL0wbfJknNy6U6a9j6pviqagmWFcGb94E3FS72RJAmKyqusXs_F48lBRo33wN5agg1lMvfqpPtykScp4wuZZMUeYJ3ZWjk3SE3skT7tJ5mRv58tmZj4ouZhp0fEnGb8O7Kugy8DuAl2eRWd-_yeyNO0Bh0WUvwEAAP__iN1isw">