From adbd5a4c849504c888b50a347b0e8bf22a657c65 Mon Sep 17 00:00:00 2001 From: Sanjay Patel Date: Mon, 6 Mar 2017 16:49:35 +0000 Subject: [PATCH] [InstSimplify] remove misleading comments; NFC Div/rem-of-0 does not cause faults/undef (not the same as div/rem-by-0). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297029 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Analysis/InstructionSimplify.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Analysis/InstructionSimplify.cpp b/lib/Analysis/InstructionSimplify.cpp index 8fce1630aee..f9c5a46c787 100644 --- a/lib/Analysis/InstructionSimplify.cpp +++ b/lib/Analysis/InstructionSimplify.cpp @@ -1031,7 +1031,7 @@ static Value *SimplifyDiv(Instruction::BinaryOps Opcode, Value *Op0, Value *Op1, if (match(Op0, m_Undef())) return Constant::getNullValue(Op0->getType()); - // 0 / X -> 0, we don't need to preserve faults! + // 0 / X -> 0 if (match(Op0, m_Zero())) return Op0; @@ -1201,7 +1201,7 @@ static Value *SimplifyRem(Instruction::BinaryOps Opcode, Value *Op0, Value *Op1, if (match(Op0, m_Undef())) return Constant::getNullValue(Op0->getType()); - // 0 % X -> 0, we don't need to preserve faults! + // 0 % X -> 0 if (match(Op0, m_Zero())) return Op0; -- 2.40.0