[llvm] 6b3289f - ARM: Remove unnecessary use_empty check (#137338)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 25 08:34:34 PDT 2025
Author: Matt Arsenault
Date: 2025-04-25T17:34:31+02:00
New Revision: 6b3289faeb201bb906dca3bc7a3e991456c45636
URL: https://github.com/llvm/llvm-project/commit/6b3289faeb201bb906dca3bc7a3e991456c45636
DIFF: https://github.com/llvm/llvm-project/commit/6b3289faeb201bb906dca3bc7a3e991456c45636.diff
LOG: ARM: Remove unnecessary use_empty check (#137338)
The previous statement removed all uses.
Added:
Modified:
llvm/lib/Target/ARM/MVEGatherScatterLowering.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/ARM/MVEGatherScatterLowering.cpp b/llvm/lib/Target/ARM/MVEGatherScatterLowering.cpp
index e998359bd3496..ce59ae0c95dcf 100644
--- a/llvm/lib/Target/ARM/MVEGatherScatterLowering.cpp
+++ b/llvm/lib/Target/ARM/MVEGatherScatterLowering.cpp
@@ -1099,8 +1099,7 @@ bool MVEGatherScatterLowering::optimiseOffsets(Value *Offsets, BasicBlock *BB,
// The instruction has now been "absorbed" into the phi value
Offs->replaceAllUsesWith(NewPhi);
- if (Offs->use_empty())
- Offs->eraseFromParent();
+ Offs->eraseFromParent();
// Clean up the old increment in case it's unused because we built a new
// one
if (IncInstruction->use_empty())
More information about the llvm-commits
mailing list