diff --git a/mlir/lib/Dialect/Math/IR/MathOps.cpp b/mlir/lib/Dialect/Math/IR/MathOps.cpp --- a/mlir/lib/Dialect/Math/IR/MathOps.cpp +++ b/mlir/lib/Dialect/Math/IR/MathOps.cpp @@ -30,8 +30,6 @@ return {}; auto attr = constOperand.dyn_cast(); - if (!attr) - return {}; APFloat sourceVal = attr.getValue(); sourceVal.roundToIntegral(llvm::RoundingMode::TowardPositive); @@ -49,8 +47,6 @@ return {}; auto attr = constOperand.dyn_cast(); - if (!attr) - return {}; auto ft = getType().cast(); @@ -74,8 +70,6 @@ OpFoldResult math::PowFOp::fold(ArrayRef operands) { auto ft = getType().dyn_cast(); - if (!ft) - return {}; APFloat vals[2]{APFloat(ft.getFloatSemantics()), APFloat(ft.getFloatSemantics())}; @@ -84,8 +78,6 @@ return {}; auto attr = operands[i].dyn_cast(); - if (!attr) - return {}; vals[i] = attr.getValue(); } @@ -107,8 +99,6 @@ return {}; auto attr = constOperand.dyn_cast(); - if (!attr) - return {}; auto ft = getType().cast();