diff options
author | Bjorn Pettersson <bjorn.a.pettersson@ericsson.com> | 2019-02-28 15:45:29 +0000 |
---|---|---|
committer | Bjorn Pettersson <bjorn.a.pettersson@ericsson.com> | 2019-02-28 15:45:29 +0000 |
commit | d30f308a9ff949cb868df5a5e731a3a912c522b7 (patch) | |
tree | 24e4d30c17bea9c8899334860ea999f4bed550c6 /llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp | |
parent | 3a24cb00ebcd4f7471ec45e7c6ae22fb47fcb85f (diff) | |
download | llvm-d30f308a9ff949cb868df5a5e731a3a912c522b7.zip llvm-d30f308a9ff949cb868df5a5e731a3a912c522b7.tar.gz llvm-d30f308a9ff949cb868df5a5e731a3a912c522b7.tar.bz2 |
Add support for computing "zext of value" in KnownBits. NFCI
Summary:
The description of KnownBits::zext() and
KnownBits::zextOrTrunc() has confusingly been telling
that the operation is equivalent to zero extending the
value we're tracking. That has not been true, instead
the user has been forced to explicitly set the extended
bits as known zero afterwards.
This patch adds a second argument to KnownBits::zext()
and KnownBits::zextOrTrunc() to control if the extended
bits should be considered as known zero or as unknown.
Reviewers: craig.topper, RKSimon
Reviewed By: RKSimon
Subscribers: javed.absar, hiraditya, jdoerfert, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D58650
llvm-svn: 355099
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp b/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp index 4a465e8..de4252a 100644 --- a/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp @@ -400,7 +400,7 @@ FunctionLoweringInfo::GetLiveOutRegInfo(unsigned Reg, unsigned BitWidth) { if (BitWidth > LOI->Known.getBitWidth()) { LOI->NumSignBits = 1; - LOI->Known = LOI->Known.zextOrTrunc(BitWidth); + LOI->Known = LOI->Known.zext(BitWidth, false /* => any extend */); } return LOI; |