@@ -1850,7 +1850,7 @@ static Instruction *foldSelectICmpEq(SelectInst &SI, ICmpInst *ICI,
18501850 return nullptr ;
18511851
18521852 const unsigned AndOps = Instruction::And, OrOps = Instruction::Or,
1853- XorOps = Instruction::Xor, NoOps = 0 ;
1853+ XorOps = Instruction::Xor;
18541854 enum NotMask { None = 0 , NotInner, NotRHS };
18551855
18561856 // We cannot refine TrueVal to FalseVal when the inner instruction contains
@@ -1860,16 +1860,13 @@ static Instruction *foldSelectICmpEq(SelectInst &SI, ICmpInst *ICI,
18601860 auto matchInner =
18611861 m_CombineAnd (m_c_BinOp (InnerOpc, m_Specific (X), m_Specific (Y)),
18621862 m_Unless (m_DisjointOr (m_Value (), m_Value ())));
1863- if (NotMask == NotInner) {
1863+ if (NotMask == NotInner)
18641864 return match (FalseVal, m_c_BinOp (OuterOpc, m_NotForbidPoison (matchInner),
18651865 m_Specific (CmpRHS)));
1866- } else if (NotMask == NotRHS) {
1866+ if (NotMask == NotRHS)
18671867 return match (FalseVal, m_c_BinOp (OuterOpc, matchInner,
18681868 m_NotForbidPoison (m_Specific (CmpRHS))));
1869- } else {
1870- return match (FalseVal,
1871- m_c_BinOp (OuterOpc, matchInner, m_Specific (CmpRHS)));
1872- }
1869+ return match (FalseVal, m_c_BinOp (OuterOpc, matchInner, m_Specific (CmpRHS)));
18731870 };
18741871
18751872 // (X&Y)==C ? X|Y : X^Y -> (X^Y)|C : X^Y or (X^Y)^ C : X^Y
0 commit comments