[LVI][CVP] Don't compute CR at SelectInst Use if Cond value may not be well-defined
authorluxufan <luxufan@iscas.ac.cn>
Wed, 19 Apr 2023 11:57:27 +0000 (19:57 +0800)
committerluxufan <luxufan@iscas.ac.cn>
Sat, 22 Apr 2023 04:54:49 +0000 (12:54 +0800)
commit1da0da903ee818385d8ce470d14f9f9c7cdf6942
tree1f63df7a71c68c233426a2258014148434b2bc03
parentd09c80515d0e7b1f1a81d3f18a3e799565f5e969
[LVI][CVP] Don't compute CR at SelectInst Use if Cond value may not be well-defined

If the condition value of SelectInst may be a poison or undef value,
infer constant range at SelectInst use is in correct.

See https://alive2.llvm.org/ce/z/MWMTYn

Fixes: https://github.com/llvm/llvm-project/issues/62200

Differential Revision: https://reviews.llvm.org/D148709
llvm/lib/Analysis/LazyValueInfo.cpp
llvm/test/Transforms/CorrelatedValuePropagation/cond-at-use.ll