Skip to content

Conversation

@sohaibiftikhar
Copy link
Contributor

@sohaibiftikhar sohaibiftikhar commented Oct 13, 2025

[LLVM][CppCompile] Fix unused variable warning after 0e02541

Fixes unused variable warning for libTransform with non debug builds.
Folds the unused variable into the assert.

@llvmbot
Copy link
Member

llvmbot commented Oct 13, 2025

@llvm/pr-subscribers-llvm-transforms

Author: Sohaib Iftikhar (sohaibiftikhar)

Changes

Fix unused variable warning for libTransform with non debug builds.
Folds the unused variable into the assert.


Full diff: https://github.com/llvm/llvm-project/pull/163203.diff

1 Files Affected:

  • (modified) llvm/lib/Transforms/Utils/SSAUpdaterBulk.cpp (+1-2)
diff --git a/llvm/lib/Transforms/Utils/SSAUpdaterBulk.cpp b/llvm/lib/Transforms/Utils/SSAUpdaterBulk.cpp
index ccb86eb2cb0fc..fb39fddde72e2 100644
--- a/llvm/lib/Transforms/Utils/SSAUpdaterBulk.cpp
+++ b/llvm/lib/Transforms/Utils/SSAUpdaterBulk.cpp
@@ -269,8 +269,7 @@ static bool replaceIfIdentical(PHINode &PHI, PHINode &ReplPHI) {
 
 bool EliminateNewDuplicatePHINodes(BasicBlock *BB,
                                    BasicBlock::phi_iterator FirstExistingPN) {
-  auto NewPHIs = make_range(BB->phis().begin(), FirstExistingPN);
-  assert(!PHIAreRefEachOther(NewPHIs));
+  assert(!PHIAreRefEachOther(make_range(BB->phis().begin(), FirstExistingPN)));
 
   // Deduplicate new PHIs first to reduce the number of comparisons on the
   // following new -> existing pass.

@sohaibiftikhar sohaibiftikhar changed the title [LLVM][CppCompile] Fix unused variable warning for libTransform with non debug builds [LLVM][CppCompile] Fix unused variable warning for after 0e025418 Oct 13, 2025
@sohaibiftikhar sohaibiftikhar changed the title [LLVM][CppCompile] Fix unused variable warning for after 0e025418 [LLVM][CppCompile] Fix unused variable warning after 0e025418 Oct 13, 2025
Fixes unused variable warning for libTransform with non debug builds.
Folds the unused variable into the assert.
@d0k d0k enabled auto-merge (squash) October 13, 2025 14:51
@d0k d0k merged commit f140491 into llvm:main Oct 13, 2025
9 of 10 checks passed
@sohaibiftikhar sohaibiftikhar deleted the r593692 branch October 13, 2025 15:11
akadutta pushed a commit to akadutta/llvm-project that referenced this pull request Oct 14, 2025
…3203)

[LLVM][CppCompile] Fix unused variable warning after 0e02541

Fixes unused variable warning for libTransform with non debug builds.
Folds the unused variable into the assert.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants