[Mlir-commits] [mlir] checkFoldResult has incorrect error message (PR #104559)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Fri Aug 16 00:26:54 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-mlir

Author: Luke Boyer (LukeBoyer)

<details>
<summary>Changes</summary>

checkFoldResult error message has expected and actual backwards.

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


1 Files Affected:

- (modified) mlir/lib/IR/Operation.cpp (+2-2) 


``````````diff
diff --git a/mlir/lib/IR/Operation.cpp b/mlir/lib/IR/Operation.cpp
index b51357198b1ca0..8f28d61c732cdc 100644
--- a/mlir/lib/IR/Operation.cpp
+++ b/mlir/lib/IR/Operation.cpp
@@ -619,8 +619,8 @@ static void checkFoldResultTypes(Operation *op,
     if (auto value = dyn_cast<Value>(ofr)) {
       if (value.getType() != opResult.getType()) {
         op->emitOpError() << "folder produced a value of incorrect type: "
-                          << opResult.getType()
-                          << ", expected: " << value.getType();
+                          << value.getType()
+                          << ", expected: " << opResult.getType();
         assert(false && "incorrect fold result type");
       }
     }

``````````

</details>


https://github.com/llvm/llvm-project/pull/104559


More information about the Mlir-commits mailing list