Skip to content

Commit

Permalink
Fix deprecated use of dyn_cast method (#2260)
Browse files Browse the repository at this point in the history
Co-authored-by: Christian Sigg <csigg@google.com>
  • Loading branch information
mlevesquedion and chsigg authored Apr 26, 2024
1 parent 3202d37 commit faf995a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion stablehlo/transforms/StablehloAggressiveSimplification.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<BlockArgument>()) {
if (auto blockArg = dyn_cast<BlockArgument>(definition)) {
// using one argument implies using the whole argument pair
const auto pairNo = blockArg.getArgNumber() % numOperandPairs;
usedArgs.set(pairNo);
Expand Down

0 comments on commit faf995a

Please sign in to comment.