mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-24 22:40:36 +00:00
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
This commit is contained in:
parent
a533429dfb
commit
ec57a7d95f
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user