diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp --- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -9391,7 +9391,7 @@ // return true if U may use the lower bits of its operands auto UserOfLowerBits = [NarrowVTSize](SDNode *U) { - if (U->getOpcode() != ISD::SRL || U->getOpcode() != ISD::SRA) { + if (U->getOpcode() != ISD::SRL && U->getOpcode() != ISD::SRA) { return true; } ConstantSDNode *UShiftAmtSrc = isConstOrConstSplat(U->getOperand(1));