[PATCH] D125280: [SCCP] Preserve Name when converting SExt->ZExt.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 10 09:14:08 PDT 2022


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG7b362ddda9ca: [SCCP] Preserve Name when converting SExt->ZExt. (authored by craig.topper).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D125280/new/

https://reviews.llvm.org/D125280

Files:
  llvm/lib/Transforms/Scalar/SCCP.cpp


Index: llvm/lib/Transforms/Scalar/SCCP.cpp
===================================================================
--- llvm/lib/Transforms/Scalar/SCCP.cpp
+++ llvm/lib/Transforms/Scalar/SCCP.cpp
@@ -164,6 +164,7 @@
         continue;
       if (IV.getConstantRange().isAllNonNegative()) {
         auto *ZExt = new ZExtInst(ExtOp, Inst.getType(), "", &Inst);
+        ZExt->takeName(&Inst);
         InsertedValues.insert(ZExt);
         Inst.replaceAllUsesWith(ZExt);
         Solver.removeLatticeValueFor(&Inst);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D125280.428402.patch
Type: text/x-patch
Size: 511 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220510/4226c55f/attachment.bin>


More information about the llvm-commits mailing list