[SCEV] Try smaller ZExts when using loop guard info.
authorFlorian Hahn <flo@fhahn.com>
Fri, 9 Jun 2023 19:05:50 +0000 (20:05 +0100)
committerFlorian Hahn <flo@fhahn.com>
Fri, 9 Jun 2023 19:05:50 +0000 (20:05 +0100)
commit2ba78229e42e1f22fc6356389ab1660ad77a3f59
tree5fd574cdd63efda96c94c8cd1d6c5d1bc70fbcad
parent347a7b2a89ce03d51a39d2380a520a27c2954af8
[SCEV] Try smaller ZExts when using loop guard info.

If we didn't find the extact ZExt expr in the rewrite map, check if
there's an entry for a smaller ZExt we can use instead.

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D149786
llvm/lib/Analysis/ScalarEvolution.cpp
llvm/test/Analysis/ScalarEvolution/backedge-taken-count-guard-info.ll