diff options
Diffstat (limited to 'llvm/lib/Transforms/Scalar/InstructionCombining.cpp')
-rw-r--r-- | llvm/lib/Transforms/Scalar/InstructionCombining.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp index 67b99c56e7e..7ef1b560477 100644 --- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp @@ -1475,6 +1475,13 @@ Instruction *InstCombiner::visitSetCondInst(BinaryOperator &I) { // integers at the end of their ranges... // if (ConstantInt *CI = dyn_cast<ConstantInt>(Op1)) { + if (Instruction *LHSI = dyn_cast<Instruction>(Op0)) + if (LHSI->getOpcode() == Instruction::Div && LHSI->hasOneUse() && + isa<ConstantInt>(LHSI->getOperand(1))) { + std::cerr << "COULD FOLD: " << *LHSI; + std::cerr << "COULD FOLD: " << I << "\n"; + } + // Simplify seteq and setne instructions... if (I.getOpcode() == Instruction::SetEQ || I.getOpcode() == Instruction::SetNE) { |