[Reassociate][NFC] Use an appropriate dyn_cast for BinaryOperator
authorWarren Ristow <warren.ristow@sony.com>
Mon, 25 Jul 2022 17:24:43 +0000 (10:24 -0700)
committerWarren Ristow <warren.ristow@sony.com>
Mon, 25 Jul 2022 17:24:43 +0000 (10:24 -0700)
commit3bbd380a5b51db23e829f8ce6b948e7b9d451f15
tree3808253cda31678e7c681353bb73d2ce424d773e
parentfc93ba061aa05a428057e7a7753128f27af0dd41
[Reassociate][NFC] Use an appropriate dyn_cast for BinaryOperator

In D129523, it was noted that there is are some questionable naked casts
from Instruction to BinaryOperator, which could be addressed by doing a
dyn_cast directly to BinaryOperator, avoiding the need for the later cast.
This cleans up that casting.

Reviewed By: nikic, spatel, RKSimon

Differential Revision: https://reviews.llvm.org/D130448
llvm/lib/Transforms/Scalar/Reassociate.cpp