summaryrefslogtreecommitdiffstats
path: root/mlir/lib/Transforms/Utils/ConstantFoldUtils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'mlir/lib/Transforms/Utils/ConstantFoldUtils.cpp')
-rw-r--r--mlir/lib/Transforms/Utils/ConstantFoldUtils.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/mlir/lib/Transforms/Utils/ConstantFoldUtils.cpp b/mlir/lib/Transforms/Utils/ConstantFoldUtils.cpp
index fc8209be872..b907840b27d 100644
--- a/mlir/lib/Transforms/Utils/ConstantFoldUtils.cpp
+++ b/mlir/lib/Transforms/Utils/ConstantFoldUtils.cpp
@@ -40,7 +40,7 @@ bool ConstantFoldHelper::tryToConstantFold(
// into the value it contains. We need to consider constants before the
// constant folding logic to avoid re-creating the same constant later.
// TODO: Extend to support dialect-specific constant ops.
- if (auto constant = op->dyn_cast<ConstantOp>()) {
+ if (auto constant = dyn_cast<ConstantOp>(op)) {
// If this constant is dead, update bookkeeping and signal the caller.
if (constant.use_empty()) {
notifyRemoval(op);
OpenPOWER on IntegriCloud