Set NumSignBits to 1 if KnownZero/KnownOne are being zero extended. In theory it

is possible to do better if the high bit is set in either KnownZero/KnownOne, but
in practice NumSignBits is always 1 when we are zero extending because nothing
is known about that register.

llvm-svn: 126465
This commit is contained in:
Cameron Zwarich 2011-02-25 01:11:01 +00:00
parent d2f3041c7f
commit 4c82cd21ed
1 changed files with 1 additions and 0 deletions

View File

@ -270,6 +270,7 @@ FunctionLoweringInfo::GetLiveOutRegInfo(unsigned Reg, unsigned BitWidth) {
return NULL;
if (BitWidth > LOI->KnownZero.getBitWidth()) {
LOI->NumSignBits = 1;
LOI->KnownZero = LOI->KnownZero.zextOrTrunc(BitWidth);
LOI->KnownOne = LOI->KnownOne.zextOrTrunc(BitWidth);
}