[SCEV] Infer known bits from known sign bits
authorPhilip Reames <listmail@philipreames.com>
Tue, 9 Mar 2021 20:35:16 +0000 (12:35 -0800)
committerPhilip Reames <listmail@philipreames.com>
Tue, 9 Mar 2021 20:37:17 +0000 (12:37 -0800)
commita25b537bf437864232cb5826539eb4cee7c47b74
tree88c2e616ef10a205f5c6efa1b256924f9c342fa2
parent63200a058e6d5f275204154a16723e8f169a317a
[SCEV] Infer known bits from known sign bits

This was suggested by lebedev.ri over on D96534.  You'll note lack of tests.  During review, we weren't actually able to find a case which exercises it, but both I and lebedev.ri feel it's a reasonable change, straight forward, and near free.

Differential Revision: https://reviews.llvm.org/D97064
llvm/lib/Analysis/ScalarEvolution.cpp