summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp
diff options
context:
space:
mode:
authorSimon Pilgrim <llvm-dev@redking.me.uk>2019-09-26 16:05:55 +0000
committerSimon Pilgrim <llvm-dev@redking.me.uk>2019-09-26 16:05:55 +0000
commit2cf54d7b713ce3f60cd44a3c084b5d42cb190f4c (patch)
tree6081a9290084fce320fd0965a99d052063d2d4a7 /llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp
parentbe13c43e08436fde88671b0912bae53dd4462f7b (diff)
downloadbcm5719-llvm-2cf54d7b713ce3f60cd44a3c084b5d42cb190f4c.tar.gz
bcm5719-llvm-2cf54d7b713ce3f60cd44a3c084b5d42cb190f4c.zip
ARMBaseInstrInfo getOperandLatency - silence static analyzer dyn_cast<> null dereference warnings. NFCI.
The static analyzer is warning about potential null dereferences, but we should be able to use cast<> directly and if not assert will fire for us. llvm-svn: 372992
Diffstat (limited to 'llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp')
-rw-r--r--llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp b/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp
index 270fefed380..de53cb3b59d 100644
--- a/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp
+++ b/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp
@@ -4337,10 +4337,10 @@ ARMBaseInstrInfo::getOperandLatency(const InstrItineraryData *ItinData,
}
const MCInstrDesc &UseMCID = get(UseNode->getMachineOpcode());
- const MachineSDNode *DefMN = dyn_cast<MachineSDNode>(DefNode);
+ auto *DefMN = cast<MachineSDNode>(DefNode);
unsigned DefAlign = !DefMN->memoperands_empty()
? (*DefMN->memoperands_begin())->getAlignment() : 0;
- const MachineSDNode *UseMN = dyn_cast<MachineSDNode>(UseNode);
+ auto *UseMN = cast<MachineSDNode>(UseNode);
unsigned UseAlign = !UseMN->memoperands_empty()
? (*UseMN->memoperands_begin())->getAlignment() : 0;
int Latency = getOperandLatency(ItinData, DefMCID, DefIdx, DefAlign,
OpenPOWER on IntegriCloud