[KnownBits] Add support for nuw/nsw on shifts
authorNikita Popov <npopov@redhat.com>
Mon, 22 May 2023 12:21:56 +0000 (14:21 +0200)
committerNikita Popov <npopov@redhat.com>
Thu, 25 May 2023 08:17:10 +0000 (10:17 +0200)
commitd2502eb091fabc36463e491b066bb002b47ba521
treeceabf3f122d50440c9bf7d18d14d344d0a2665c8
parent660b3c85c8ea74909de0116bd1dae1b83342cffa
[KnownBits] Add support for nuw/nsw on shifts

Implement precise nuw/nsw support in the KnownBits implementation,
replacing the rather crude handling in ValueTracking.

Differential Revision: https://reviews.llvm.org/D151208
llvm/include/llvm/Support/KnownBits.h
llvm/lib/Analysis/ValueTracking.cpp
llvm/lib/Support/KnownBits.cpp
llvm/test/Transforms/ConstraintElimination/geps-unsigned-predicates.ll
llvm/test/Transforms/LoopVectorize/AArch64/sve-interleaved-accesses.ll
llvm/unittests/Support/KnownBitsTest.cpp