[llvm] ARM: Remove unnecessary use_empty check (PR #137338)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 25 08:32:06 PDT 2025
https://github.com/arsenm updated https://github.com/llvm/llvm-project/pull/137338
>From dc226e38e5256ca816f836c6b3a9563664f34098 Mon Sep 17 00:00:00 2001
From: Matt Arsenault <Matthew.Arsenault at amd.com>
Date: Fri, 25 Apr 2025 16:20:32 +0200
Subject: [PATCH] ARM: Remove unnecessary use_empty check
The previous statement removed all uses.
---
llvm/lib/Target/ARM/MVEGatherScatterLowering.cpp | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
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