[llvm] bd12113 - [NFC][InstCombine] Fix some comments: the code already uses IC::replaceInstUsesWith()
Roman Lebedev via llvm-commits
llvm-commits at lists.llvm.org
Sat Aug 29 05:11:19 PDT 2020
Author: Roman Lebedev
Date: 2020-08-29T15:10:14+03:00
New Revision: bd12113f575be38b6b3d65fa599ac6bb84918689
URL: https://github.com/llvm/llvm-project/commit/bd12113f575be38b6b3d65fa599ac6bb84918689
DIFF: https://github.com/llvm/llvm-project/commit/bd12113f575be38b6b3d65fa599ac6bb84918689.diff
LOG: [NFC][InstCombine] Fix some comments: the code already uses IC::replaceInstUsesWith()
Added:
Modified:
llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp b/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
index ef2563ce4cec..230c3e1b1a43 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
@@ -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()));
More information about the llvm-commits
mailing list