[PATCH] D38415: [SimplifyIndVar] Correctly extract constant LLVM value from SCEV during constant folding
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 29 12:35:02 PDT 2017
efriedma added inline comments.
================
Comment at: lib/Transforms/Utils/SimplifyIndVar.cpp:551
+ V = ConstantPointerNull::get(PT);
+ }
+
----------------
Could you use SCEVExpander rather than writing out the cast logic here? I'm not sure this covers all the relevant cases.
================
Comment at: lib/Transforms/Utils/SimplifyIndVar.cpp:557
+ if (auto *U = dyn_cast<SCEVUnknown>(S))
+ return dyn_cast<Constant>(U->getValue());
+
----------------
Does it actually matter whether the value here is a Constant?
Repository:
rL LLVM
https://reviews.llvm.org/D38415
More information about the llvm-commits
mailing list