diff --git a/llvm/lib/IR/Constants.cpp b/llvm/lib/IR/Constants.cpp index 0005b2f2dc5438..4e480691558f04 100644 --- a/llvm/lib/IR/Constants.cpp +++ b/llvm/lib/IR/Constants.cpp @@ -2133,13 +2133,13 @@ bool ConstantExpr::isDesirableBinOp(unsigned Opcode) { case Instruction::FRem: case Instruction::And: case Instruction::Or: - case Instruction::Mul: - case Instruction::AShr: return false; case Instruction::Add: case Instruction::Sub: + case Instruction::Mul: case Instruction::Shl: case Instruction::LShr: + case Instruction::AShr: case Instruction::Xor: return true; default: