Skip to content

Commit c0c30d1

Browse files
MaskRayDanielCChen
authored andcommitted
[AMDGPU] Fix -Wunused-variable in non-assertion builds after llvm#109818
1 parent b51bfb4 commit c0c30d1

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

llvm/lib/Target/AMDGPU/SIPreEmitPeephole.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -347,10 +347,7 @@ class BranchWeightCostModel {
347347
bool SIPreEmitPeephole::mustRetainExeczBranch(
348348
const MachineInstr &Branch, const MachineBasicBlock &From,
349349
const MachineBasicBlock &To) const {
350-
351-
const MachineBasicBlock &Head = *Branch.getParent();
352-
assert(is_contained(Head.successors(), &From));
353-
350+
assert(is_contained(Branch.getParent()->successors(), &From));
354351
BranchWeightCostModel CostModel{*TII, Branch, From};
355352

356353
const MachineFunction *MF = From.getParent();

0 commit comments

Comments
 (0)