[SCEV] Don't expand Wrap predicate using inttoptr in ni addrspaces
authorKeno Fischer <keno@alumni.harvard.edu>
Thu, 26 Jul 2018 21:55:06 +0000 (21:55 +0000)
committerKeno Fischer <keno@alumni.harvard.edu>
Thu, 26 Jul 2018 21:55:06 +0000 (21:55 +0000)
commit864fbd8e9ad3e865c6d51d159b094badc6a14b76
treea8c383e034b31c984ae8b1b151b91113372c5fb5
parent259ea987f56a2e68379adfbf290a52ef855d0207
[SCEV] Don't expand Wrap predicate using inttoptr in ni addrspaces

Summary:
In non-integral address spaces, we're not allowed to introduce inttoptr/ptrtoint
intrinsics. Instead, we need to expand any pointer arithmetic as geps on the
base pointer. Luckily this is a common task for SCEV, so all we have to do here
is hook up the corresponding helper function and add test case.

Fixes PR38290

Reviewers: sanjoy
Differential Revision: https://reviews.llvm.org/D49832

llvm-svn: 338073
llvm/lib/Analysis/ScalarEvolutionExpander.cpp
llvm/test/Analysis/LoopAccessAnalysis/wrapping-pointer-ni.ll [new file with mode: 0644]
llvm/test/Analysis/LoopAccessAnalysis/wrapping-pointer-versioning.ll