[all-commits] [llvm/llvm-project] 1c021c: [SCEV] Model ptrtoint(SCEVUnknown) cast not as unk...
Roman Lebedev via All-commits
all-commits at lists.llvm.org
Mon Oct 12 01:04:46 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 1c021c64caef83cccb719c9bf0a2554faa6563af
https://github.com/llvm/llvm-project/commit/1c021c64caef83cccb719c9bf0a2554faa6563af
Author: Roman Lebedev <lebedev.ri at gmail.com>
Date: 2020-10-12 (Mon, 12 Oct 2020)
Changed paths:
M llvm/lib/Analysis/ScalarEvolution.cpp
M llvm/lib/Transforms/Utils/SimplifyIndVar.cpp
M llvm/test/Analysis/ScalarEvolution/add-expr-pointer-operand-sorting.ll
M llvm/test/Analysis/ScalarEvolution/no-wrap-add-exprs.ll
M llvm/test/Analysis/ScalarEvolution/ptrtoint.ll
M llvm/test/CodeGen/ARM/lsr-undef-in-binop.ll
M llvm/test/CodeGen/X86/ragreedy-hoist-spill.ll
M llvm/test/Transforms/IndVarSimplify/2011-11-01-lftrptr.ll
M polly/test/Isl/CodeGen/scev_looking_through_bitcasts.ll
Log Message:
-----------
[SCEV] Model ptrtoint(SCEVUnknown) cast not as unknown, but as zext/trunc/self of SCEVUnknown
While we indeed can't treat them as no-ops, i believe we can/should
do better than just modelling them as `unknown`. `inttoptr` story
is complicated, but for `ptrtoint`, it seems straight-forward
to model it just as a zext-or-trunc of unknown.
This may be important now that we track towards
making inttoptr/ptrtoint casts not no-op,
and towards preventing folding them into loads/etc
(see D88979/D88789/D88788)
Reviewed By: mkazantsev
Differential Revision: https://reviews.llvm.org/D88806
More information about the All-commits
mailing list