[PATCH] D125280: [SCCP] Preserve Name when converting SExt->ZExt.
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 9 16:48:39 PDT 2022
craig.topper created this revision.
craig.topper added reviewers: reames, spatel, efriedma.
Herald added subscribers: StephenFan, hiraditya.
Herald added a project: All.
craig.topper requested review of this revision.
Herald added a project: LLVM.
This makes the output IR more readable since we're doing a one to
one replacement.
Repository:
rG LLVM Github Monorepo
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.428238.patch
Type: text/x-patch
Size: 511 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220509/945929da/attachment.bin>
More information about the llvm-commits
mailing list