[llvm] 5d1a6d0 - [ARM] Remove unnecessary use of replaceSymbolicStrideSCEV (NFC).

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 10 01:47:53 PDT 2021


Author: Florian Hahn
Date: 2021-09-10T10:47:26+02:00
New Revision: 5d1a6d0d1a48c59a036c7ce8698471005c3b4ae3

URL: https://github.com/llvm/llvm-project/commit/5d1a6d0d1a48c59a036c7ce8698471005c3b4ae3
DIFF: https://github.com/llvm/llvm-project/commit/5d1a6d0d1a48c59a036c7ce8698471005c3b4ae3.diff

LOG: [ARM] Remove unnecessary use of replaceSymbolicStrideSCEV (NFC).

When passing an empty strides map, there's nothing to replace for
replaceSymbolicStrideSCEV and it just returns the SCEV for Ptr. There
should be no need to call the function.

Reviewed By: SjoerdMeijer

Differential Revision: https://reviews.llvm.org/D109462

Added: 
    

Modified: 
    llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp b/llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp
index 17a46c10b227..fb834c01301b 100644
--- a/llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp
+++ b/llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp
@@ -2080,8 +2080,7 @@ static bool canTailPredicateLoop(Loop *L, LoopInfo *LI, ScalarEvolution &SE,
           // least if they are loop invariant.
           // TODO: Loop variant strides should in theory work, too, but
           // this requires further testing.
-          const SCEV *PtrScev =
-              replaceSymbolicStrideSCEV(PSE, llvm::ValueToValueMap(), Ptr);
+          const SCEV *PtrScev = PSE.getSE()->getSCEV(Ptr);
           if (auto AR = dyn_cast<SCEVAddRecExpr>(PtrScev)) {
             const SCEV *Step = AR->getStepRecurrence(*PSE.getSE());
             if (PSE.getSE()->isLoopInvariant(Step, L))


        


More information about the llvm-commits mailing list