[NFC][InstCombine] Fix some comments: the code already uses IC::replaceInstUsesWith()
authorRoman Lebedev <lebedev.ri@gmail.com>
Sat, 29 Aug 2020 11:54:08 +0000 (14:54 +0300)
committerRoman Lebedev <lebedev.ri@gmail.com>
Sat, 29 Aug 2020 12:10:14 +0000 (15:10 +0300)
llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp

index ef2563c..230c3e1 100644 (file)
@@ -1900,7 +1900,7 @@ Instruction *InstCombinerImpl::visitCallBase(CallBase &Call) {
         !CalleeF->isDeclaration()) {
       Instruction *OldCall = &Call;
       CreateNonTerminatorUnreachable(OldCall);
-      // If OldCall does not return void then replaceAllUsesWith undef.
+      // If OldCall does not return void then replaceInstUsesWith undef.
       // This allows ValueHandlers and custom metadata to adjust itself.
       if (!OldCall->getType()->isVoidTy())
         replaceInstUsesWith(*OldCall, UndefValue::get(OldCall->getType()));
@@ -1919,7 +1919,7 @@ Instruction *InstCombinerImpl::visitCallBase(CallBase &Call) {
   if ((isa<ConstantPointerNull>(Callee) &&
        !NullPointerIsDefined(Call.getFunction())) ||
       isa<UndefValue>(Callee)) {
-    // If Call does not return void then replaceAllUsesWith undef.
+    // If Call does not return void then replaceInstUsesWith undef.
     // This allows ValueHandlers and custom metadata to adjust itself.
     if (!Call.getType()->isVoidTy())
       replaceInstUsesWith(Call, UndefValue::get(Call.getType()));