mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
[VPlanSLP] Don't dereference a cast_or_null<VPInstruction> result. NFCI.
The static analyzer is warning about a potential null dereference of the cast_or_null result, I've split the cast_or_null check from the ->getUnderlyingInstr() call to avoid this, but it appears that we weren't seeing any null pointers in the dumped bundles in the first place. llvm-svn: 371975
This commit is contained in:
parent
e13e496c29
commit
6ddc38e0ff
@ -346,11 +346,14 @@ SmallVector<VPlanSlp::MultiNodeOpTy, 4> VPlanSlp::reorderMultiNodeOps() {
|
|||||||
|
|
||||||
void VPlanSlp::dumpBundle(ArrayRef<VPValue *> Values) {
|
void VPlanSlp::dumpBundle(ArrayRef<VPValue *> Values) {
|
||||||
dbgs() << " Ops: ";
|
dbgs() << " Ops: ";
|
||||||
for (auto Op : Values)
|
for (auto Op : Values) {
|
||||||
if (auto *Instr = cast_or_null<VPInstruction>(Op)->getUnderlyingInstr())
|
if (auto *VPInstr = cast_or_null<VPInstruction>(Op))
|
||||||
dbgs() << *Instr << " | ";
|
if (auto *Instr = VPInstr->getUnderlyingInstr()) {
|
||||||
else
|
dbgs() << *Instr << " | ";
|
||||||
dbgs() << " nullptr | ";
|
continue;
|
||||||
|
}
|
||||||
|
dbgs() << " nullptr | ";
|
||||||
|
}
|
||||||
dbgs() << "\n";
|
dbgs() << "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user