From faf995aec3aab212d79a7a5a18f26a4b33095e78 Mon Sep 17 00:00:00 2001 From: mlevesquedion Date: Fri, 26 Apr 2024 09:24:01 -0700 Subject: [PATCH] Fix deprecated use of dyn_cast method (#2260) Co-authored-by: Christian Sigg --- stablehlo/transforms/StablehloAggressiveSimplification.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stablehlo/transforms/StablehloAggressiveSimplification.cpp b/stablehlo/transforms/StablehloAggressiveSimplification.cpp index 8e4fac9d46..e4a4394362 100644 --- a/stablehlo/transforms/StablehloAggressiveSimplification.cpp +++ b/stablehlo/transforms/StablehloAggressiveSimplification.cpp @@ -784,7 +784,7 @@ struct UnusedResultReduceOpCanon final addToWorkList(retOp.getOperand(resultNo)); while (!workList.empty()) { auto definition = workList.pop_back_val(); - if (auto blockArg = definition.dyn_cast()) { + if (auto blockArg = dyn_cast(definition)) { // using one argument implies using the whole argument pair const auto pairNo = blockArg.getArgNumber() % numOperandPairs; usedArgs.set(pairNo);