Fix a comment that stated the wrong thing.
authorReid Spencer <rspencer@reidspencer.com>
Sat, 30 Apr 2005 06:45:47 +0000 (06:45 +0000)
committerReid Spencer <rspencer@reidspencer.com>
Sat, 30 Apr 2005 06:45:47 +0000 (06:45 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21638 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/IPO/SimplifyLibCalls.cpp

index 95faac2071327edfc50f87823b72fd1c4e296819..9a4a4f3273043bce4d14a8aa1dd985009e381f5b 100644 (file)
@@ -511,11 +511,8 @@ public:
   virtual bool OptimizeCall(CallInst* ci, SimplifyLibCalls& SLC)
   {
     // First, check to see if src and destination are the same. If they are,
-    // then the optimization is to replace the CallInst with the destination
-    // because the call is a no-op. Note that this corresponds to the 
-    // degenerate strcpy(X,X) case which should have "undefined" results
-    // according to the C specification. However, it occurs sometimes and
-    // we optimize it as a no-op.
+    // then the optimization is to replace the CallInst with a constant 0
+    // because the call is a no-op. 
     Value* s1 = ci->getOperand(1);
     Value* s2 = ci->getOperand(2);
     if (s1 == s2)