[llvm] [SCEV] Do not represent ptrtoint as ptrtoaddr (PR #219156)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 27 04:17:31 PDT 2026
nikic wrote:
The main regression I see on llvm-opt-benchmark is that we now no longer unroll loops with a `ptrtoint(p) & 7 == 0` style exit condition, i.e. loops until a pointer is aligned. Previously this determined a max trip count of 8 and performed an upper bound unroll (though I have trouble replicating such an upper bound unroll running just the unroller...) Now we get an unpredictable trip count.
I think unrolling in this case is actually not desirable (such pre-alignment loops are typically cold because the input is aligned), so it probably doesn't make sense to try and recover it?
https://github.com/llvm/llvm-project/pull/219156
More information about the llvm-commits
mailing list