[PATCH] D49832: [SCEV] Don't expand Wrap predicate using inttoptr in ni addrspaces
Sanjoy Das via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 26 09:17:59 PDT 2018
sanjoy accepted this revision.
sanjoy added a comment.
This revision is now accepted and ready to land.
lgtm
================
Comment at: lib/Analysis/ScalarEvolutionExpander.cpp:2204
+ if (ARExpandTy->isPointerTy()) {
+ PointerType *ARPtrTy = cast<PointerType>(ARExpandTy);
+ const SCEV *MulS = SE.getSCEV(MulV);
----------------
This can be
```
if (auto *ARPtrTy = dyn_cast<PointerType>(ARExpandTy)) {
}
```
================
Comment at: lib/Analysis/ScalarEvolutionExpander.cpp:2208
+ Add = Builder.CreateBitCast(
+ expandAddToGEP(&StepArray[0], &StepArray[1], ARPtrTy, Ty, StartValue),
+ ARPtrTy);
----------------
This pattern is a bit confusing -- do you mind adding an overload for `expandAddToGEP` that takes one operand and does this internally?
================
Comment at: test/Analysis/LoopAccessAnalysis/wrapping-pointer-ni.ll:15
+
+define void @"japi1_align!_9477"(%jl_value_t addrspace(10)**) #0 {
+; LV-LAVEL: L26.lver.check
----------------
Do you mind cleaning up the test using instnamer? Having `%1`, `%2` as instruction names make it difficult to change the test later since adding an instruction changes the numbering for all following instructions.
While you're at it, can you please also remove some of the unnecessary metadata here?
Repository:
rL LLVM
https://reviews.llvm.org/D49832
More information about the llvm-commits
mailing list