diff --git a/lib/Target/Hexagon/HexagonEarlyIfConv.cpp b/lib/Target/Hexagon/HexagonEarlyIfConv.cpp index 4418b57f6a060..ccce8c136c376 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; }