[llvm] [NFC][indvars] Remove unused code in WidenIV::widenLoopCompare (PR #73506)

Wenju He via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 29 17:11:38 PST 2023


https://github.com/wenju-he updated https://github.com/llvm/llvm-project/pull/73506

>From aa5e726f948da7892a514ad972a56c75940f9b00 Mon Sep 17 00:00:00 2001
From: Wenju He <wenju.he at intel.com>
Date: Mon, 27 Nov 2023 19:37:44 +0800
Subject: [PATCH] [NFC][indvars] Remove unused code in
 WidenIV::widenLoopCompare

---
 llvm/lib/Transforms/Utils/SimplifyIndVar.cpp | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/llvm/lib/Transforms/Utils/SimplifyIndVar.cpp b/llvm/lib/Transforms/Utils/SimplifyIndVar.cpp
index c2ca97d9ef9f78b..722ed03db3de30e 100644
--- a/llvm/lib/Transforms/Utils/SimplifyIndVar.cpp
+++ b/llvm/lib/Transforms/Utils/SimplifyIndVar.cpp
@@ -1511,10 +1511,6 @@ bool WidenIV::widenLoopCompare(WidenIV::NarrowIVDefUse DU) {
   assert(CastWidth <= IVWidth && "Unexpected width while widening compare.");
 
   // Widen the compare instruction.
-  auto *InsertPt = getInsertPointForUses(DU.NarrowUse, DU.NarrowDef, DT, LI);
-  if (!InsertPt)
-    return false;
-  IRBuilder<> Builder(InsertPt);
   DU.NarrowUse->replaceUsesOfWith(DU.NarrowDef, DU.WideDef);
 
   // Widen the other operand of the compare, if necessary.



More information about the llvm-commits mailing list