]> granicus.if.org Git - llvm/commit
[KnownBits] Add methods for determining if the known bits represent a negative/nonneg...
authorCraig Topper <craig.topper@gmail.com>
Sat, 29 Apr 2017 16:43:11 +0000 (16:43 +0000)
committerCraig Topper <craig.topper@gmail.com>
Sat, 29 Apr 2017 16:43:11 +0000 (16:43 +0000)
commit8b6961057415b765a76e35c46cfc9388601539dc
tree9cc05d7970d813892bb7c8e20bbcea22c149addb
parentd9e74d6d4a5534346514b89e30f02bb602f97d3b
[KnownBits] Add methods for determining if the known bits represent a negative/nonnegative number and add methods for changing the negative/nonnegative state

Summary: This patch adds isNegative, isNonNegative for querying whether the sign bit is known. It also adds makeNegative and makeNonNegative for controlling the sign bit.

Reviewers: RKSimon, spatel, davide

Reviewed By: RKSimon

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D32651

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301747 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Support/KnownBits.h
lib/Analysis/ValueTracking.cpp
lib/CodeGen/SelectionDAG/SelectionDAG.cpp
lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp