[ARM] ARMDAGToDAGISel::tryReadRegister/tryWriteRegister - don't dereference dyn_cast...
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Tue, 17 Aug 2021 17:13:59 +0000 (18:13 +0100)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Tue, 17 Aug 2021 17:40:59 +0000 (18:40 +0100)
commit1e770f0388c92bdb5bd474b8c4a8fce4f0c62b74
treeb2a7d2cc8a039eb82e6a73e0eeae74b432140170
parentdc0d4b97a2c2fe79f8a8978e227ac2f3e043eddb
[ARM] ARMDAGToDAGISel::tryReadRegister/tryWriteRegister - don't dereference dyn_cast<> results.

dyn_cast<> can return nullptr if the cast is illegal, use cast<> instead which will assert that the cast is correct.

Fixes static analyser warnings.
llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp