mirror of
https://github.com/intel/llvm.git
synced 2026-01-29 12:53:33 +08:00
[CodeGen] Fix uninitialized variables exposed by r303084
All other calls of analyzeBranch reset PredTBB and PredFBB, so I assume it's expected behavior. llvm-svn: 303581
This commit is contained in:
@@ -749,7 +749,7 @@ bool TailDuplicator::canTailDuplicate(MachineBasicBlock *TailBB,
|
||||
if (PredBB->succ_size() > 1)
|
||||
return false;
|
||||
|
||||
MachineBasicBlock *PredTBB, *PredFBB;
|
||||
MachineBasicBlock *PredTBB = nullptr, *PredFBB = nullptr;
|
||||
SmallVector<MachineOperand, 4> PredCond;
|
||||
if (TII->analyzeBranch(*PredBB, PredTBB, PredFBB, PredCond))
|
||||
return false;
|
||||
@@ -832,7 +832,7 @@ bool TailDuplicator::tailDuplicate(bool IsSimple, MachineBasicBlock *TailBB,
|
||||
appendCopies(PredBB, CopyInfos, Copies);
|
||||
|
||||
// Simplify
|
||||
MachineBasicBlock *PredTBB, *PredFBB;
|
||||
MachineBasicBlock *PredTBB = nullptr, *PredFBB = nullptr;
|
||||
SmallVector<MachineOperand, 4> PredCond;
|
||||
TII->analyzeBranch(*PredBB, PredTBB, PredFBB, PredCond);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user