[SCEV] Cache folded SExt SCEV expressions.
authorFlorian Hahn <flo@fhahn.com>
Wed, 14 Dec 2022 11:59:19 +0000 (11:59 +0000)
committerFlorian Hahn <flo@fhahn.com>
Wed, 14 Dec 2022 11:59:19 +0000 (11:59 +0000)
commit6e86b544dddae043be0e896f0d5101eb9d1a89f7
tree13824e7ec1b50e1e373cafd4af319f93e83ab382
parent31f7b1eb65add100953f11ffec34d7a3a2e30299
[SCEV] Cache folded SExt SCEV expressions.

Use FoldID to cache SignExtendExprs that get folded to a different
SCEV.

Depends on D137505.

Reviewed By: mkazantsev

Differential Revision: https://reviews.llvm.org/D137849
llvm/include/llvm/Analysis/ScalarEvolution.h
llvm/lib/Analysis/ScalarEvolution.cpp
llvm/test/Transforms/IndVarSimplify/range-iter-threshold.ll