OSDN Git Service

[InstSimplify] remove misleading comments; NFC
authorSanjay Patel <spatel@rotateright.com>
Mon, 6 Mar 2017 16:49:35 +0000 (16:49 +0000)
committerSanjay Patel <spatel@rotateright.com>
Mon, 6 Mar 2017 16:49:35 +0000 (16:49 +0000)
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

index 8fce163..f9c5a46 100644 (file)
@@ -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;