From: Sanjay Patel Date: Mon, 6 Mar 2017 16:49:35 +0000 (+0000) Subject: [InstSimplify] remove misleading comments; NFC X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=adbd5a4c849504c888b50a347b0e8bf22a657c65;p=llvm [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 --- 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;