mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-16 14:27:54 +00:00
Fix a comment that stated the wrong thing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21638 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -511,11 +511,8 @@ public:
|
|||||||
virtual bool OptimizeCall(CallInst* ci, SimplifyLibCalls& SLC)
|
virtual bool OptimizeCall(CallInst* ci, SimplifyLibCalls& SLC)
|
||||||
{
|
{
|
||||||
// First, check to see if src and destination are the same. If they are,
|
// 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
|
// then the optimization is to replace the CallInst with a constant 0
|
||||||
// because the call is a no-op. Note that this corresponds to the
|
// because the call is a no-op.
|
||||||
// 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.
|
|
||||||
Value* s1 = ci->getOperand(1);
|
Value* s1 = ci->getOperand(1);
|
||||||
Value* s2 = ci->getOperand(2);
|
Value* s2 = ci->getOperand(2);
|
||||||
if (s1 == s2)
|
if (s1 == s2)
|
||||||
|
Reference in New Issue
Block a user