summaryrefslogtreecommitdiffstats
path: root/mlir/lib/Dialect/QuantOps/IR/QuantOps.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'mlir/lib/Dialect/QuantOps/IR/QuantOps.cpp')
-rw-r--r--mlir/lib/Dialect/QuantOps/IR/QuantOps.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/mlir/lib/Dialect/QuantOps/IR/QuantOps.cpp b/mlir/lib/Dialect/QuantOps/IR/QuantOps.cpp
index faeff246bd2..8ff6fbed587 100644
--- a/mlir/lib/Dialect/QuantOps/IR/QuantOps.cpp
+++ b/mlir/lib/Dialect/QuantOps/IR/QuantOps.cpp
@@ -36,8 +36,8 @@ QuantizationDialect::QuantizationDialect(MLIRContext *context)
OpFoldResult StorageCastOp::fold(ArrayRef<Attribute> operands) {
/// Matches x -> [scast -> scast] -> y, replacing the second scast with the
/// value of x if the casts invert each other.
- auto srcScastOp = dyn_cast_or_null<StorageCastOp>(arg()->getDefiningOp());
- if (!srcScastOp || srcScastOp.arg()->getType() != getType())
+ auto srcScastOp = dyn_cast_or_null<StorageCastOp>(arg().getDefiningOp());
+ if (!srcScastOp || srcScastOp.arg().getType() != getType())
return OpFoldResult();
return srcScastOp.arg();
}
OpenPOWER on IntegriCloud