[KnownBits] Define and use intersectWith and unionWith
authorJay Foad <jay.foad@amd.com>
Wed, 10 May 2023 15:50:33 +0000 (16:50 +0100)
committerJay Foad <jay.foad@amd.com>
Tue, 16 May 2023 08:23:51 +0000 (09:23 +0100)
commitd8229e2f1424504f7ea81a0dcc7326d122be2872
treebf94f52f74ee590e4c55d2f0fb0da381db11df25
parent71ac47f39120e77c7364799ca30cbd59b5caf5f7
[KnownBits] Define and use intersectWith and unionWith

Define intersectWith and unionWith as two complementary ways of
combining KnownBits. The names are chosen for consistency with
ConstantRange.

Deprecate commonBits as a synonym for intersectWith.

Differential Revision: https://reviews.llvm.org/D150443
15 files changed:
llvm/include/llvm/Support/KnownBits.h
llvm/lib/Analysis/ValueTracking.cpp
llvm/lib/CodeGen/GlobalISel/GISelKnownBits.cpp
llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
llvm/lib/Support/KnownBits.cpp
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
llvm/lib/Target/ARM/ARMISelLowering.cpp
llvm/lib/Target/Lanai/LanaiISelLowering.cpp
llvm/lib/Target/RISCV/RISCVISelLowering.cpp
llvm/lib/Target/Sparc/SparcISelLowering.cpp
llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp