[SCEV] Use constant ranges when determining reachable blocks (PR54434)
authorNikita Popov <npopov@redhat.com>
Fri, 18 Mar 2022 11:01:05 +0000 (12:01 +0100)
committerNikita Popov <npopov@redhat.com>
Fri, 18 Mar 2022 11:04:35 +0000 (12:04 +0100)
commit6ffb3ad631c5071ce82c8b6c73dd1c88e0452944
tree314bbfea300a4376c245af841807dcb22de2a20c
parenta4d6de2031ad2f92d399fc8d1b1301229ed8255b
[SCEV] Use constant ranges when determining reachable blocks (PR54434)

This avoids false positive verification failures if the condition
is not literally true/false, but SCEV still makes use of the fact
that a loop is not reachable through more complex reasoning.

Fixes https://github.com/llvm/llvm-project/issues/54434.
llvm/include/llvm/Analysis/ScalarEvolution.h
llvm/lib/Analysis/ScalarEvolution.cpp
llvm/test/Transforms/IndVarSimplify/pr54434.ll [new file with mode: 0644]