[llvm-branch-commits] [llvm] ARM: Remove unnecessary use_empty check (PR #137338)
via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Fri Apr 25 07:21:43 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-backend-arm
Author: Matt Arsenault (arsenm)
<details>
<summary>Changes</summary>
The previous statement removed all uses.
---
Full diff: https://github.com/llvm/llvm-project/pull/137338.diff
1 Files Affected:
- (modified) llvm/lib/Target/ARM/MVEGatherScatterLowering.cpp (+1-2)
``````````diff
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())
``````````
</details>
https://github.com/llvm/llvm-project/pull/137338
More information about the llvm-branch-commits
mailing list