[ConstantRange] Improve the implementation of binaryAnd
authorAlexander Shaposhnikov <ashaposhnikov@google.com>
Tue, 17 May 2022 21:30:44 +0000 (21:30 +0000)
committerAlexander Shaposhnikov <ashaposhnikov@google.com>
Tue, 17 May 2022 22:06:03 +0000 (22:06 +0000)
commit0f4d9f9b71be8a95cd24534bf914fc9a6fb0ff30
tree51524f0afeaeecc61e3c99ef2a4767a91d5a9bcc
parentc907d6e0e9fd8fafd49e4d0f9e584f58bbac5ead
[ConstantRange] Improve the implementation of binaryAnd

This diff adjusts binaryAnd to take advantage of the analysis
based on KnownBits.

Differential revision: https://reviews.llvm.org/D125603

Test plan:
1/ ninja check-llvm
2/ ninja check-llvm-unit
llvm/lib/IR/ConstantRange.cpp
llvm/test/Transforms/SCCP/range-and.ll
llvm/unittests/IR/ConstantRangeTest.cpp