<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/56220>56220</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            mlir BuiltinDialect.cpp compilation error use of overloaded operator '!=' is ambiguous 
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          xivarri
      </td>
    </tr>
</table>

<pre>
    Hi - when trying to compile mlir as part of building tensorflow using bazel, I get the following error, which does seem to reflect the current code. I don't understand the code well enough to propose a fix though, any workaround? Thanks

```
Compiling mlir/lib/IR/BuiltinDialect.cpp [for host] failed: (Exit 1): clang failed: error executing command /usr/lib/llvm-12/bin/clang -U_FORTIFY_SOURCE -fstack-protector -Wall -Wthread-safety -Wself-assign -Wno-free-nonheap-object -fcolor-diagnostics -fno-omit-frame-pointer -g0 -O2 '-D_FORTIFY_SOURCE=1' ... (remaining 122 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox
external/llvm-project/mlir/lib/IR/BuiltinDialect.cpp:160:40: error: use of overloaded operator '!=' is ambiguous (with operand types 'mlir::OpTrait::detail::MultiResultTraitBase::result_range' (aka 'mlir::ResultRange') and 'mlir::OperandRange')
  if (!inputOp || inputOp.getResults() != operands ||
                  ~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~
external/llvm-project/llvm/include/llvm/ADT/STLExtras.h:1175:35: note: candidate function [with OtherT = mlir::OperandRange]
  template <typename OtherT> bool operator!=(const OtherT &other) const {
                                  ^
external/llvm-project/llvm/include/llvm/ADT/STLExtras.h:1170:35: note: candidate function [with OtherT = mlir::OperandRange]
  template <typename OtherT> bool operator==(const OtherT &other) const {
                                  ^
external/llvm-project/llvm/include/llvm/ADT/STLExtras.h:1170:35: note: candidate function (with reversed parameter order) [with OtherT = mlir::ResultRange]
1 error generated.
```
</pre>
<img width="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