diff --git a/lib/Target/Hexagon/HexagonEarlyIfConv.cpp b/lib/Target/Hexagon/HexagonEarlyIfConv.cpp index 4418b57f6a0..ccce8c136c3 100644 --- a/lib/Target/Hexagon/HexagonEarlyIfConv.cpp +++ b/lib/Target/Hexagon/HexagonEarlyIfConv.cpp @@ -482,7 +482,7 @@ unsigned HexagonEarlyIfConversion::computePhiCost(const MachineBasicBlock *B, const MachineOperand &RB = MI.getOperand(3); assert(RA.isReg() && RB.isReg()); // Must have a MUX if the phi uses a subregister. - if (RA.getSubReg() != 0 || RA.getSubReg() != 0) { + if (RA.getSubReg() != 0 || RB.getSubReg() != 0) { Cost++; continue; }