[llvm] [PromoteMemToReg] Hoist removeIntrinsicUsers into a pre-pass before promotion (PR #224617)
Marcin Radomski via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 21 01:57:07 PDT 2026
================
@@ -810,14 +810,15 @@ void PromoteMem2Reg::run() {
NoSignedZeros = F.getFnAttribute("no-signed-zeros-fp-math").getValueAsBool();
- for (unsigned AllocaNum = 0; AllocaNum != Allocas.size(); ++AllocaNum) {
- AllocaInst *AI = Allocas[AllocaNum];
-
+ for (AllocaInst *AI : Allocas) {
----------------
dextero wrote:
Great point! Added an explanation comment.
https://github.com/llvm/llvm-project/pull/224617
More information about the llvm-commits
mailing list