[PATCH] D146444: [IndVarSimplify] Remove duplicate call to getSCEV. NFC

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 21 09:47:25 PDT 2023


This revision was automatically updated to reflect the committed changes.
Closed by commit rG24caf0196d03: [IndVarSimplify] Remove duplicate call to getSCEV. NFC (authored by craig.topper).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D146444

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


Index: llvm/lib/Transforms/Scalar/IndVarSimplify.cpp
===================================================================
--- llvm/lib/Transforms/Scalar/IndVarSimplify.cpp
+++ llvm/lib/Transforms/Scalar/IndVarSimplify.cpp
@@ -1080,8 +1080,7 @@
     // a truncate within in.
     bool Extended = false;
     const SCEV *IV = SE->getSCEV(CmpIndVar);
-    const SCEV *TruncatedIV = SE->getTruncateExpr(SE->getSCEV(CmpIndVar),
-                                                  ExitCnt->getType());
+    const SCEV *TruncatedIV = SE->getTruncateExpr(IV, ExitCnt->getType());
     const SCEV *ZExtTrunc =
       SE->getZeroExtendExpr(TruncatedIV, CmpIndVar->getType());
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D146444.507023.patch
Type: text/x-patch
Size: 666 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230321/afe8cf38/attachment.bin>


More information about the llvm-commits mailing list