[llvm-commits] [llvm] r126465 - /llvm/trunk/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
Cameron Zwarich
zwarich at apple.com
Thu Feb 24 17:11:01 PST 2011
Author: zwarich
Date: Thu Feb 24 19:11:01 2011
New Revision: 126465
URL: http://llvm.org/viewvc/llvm-project?rev=126465&view=rev
Log:
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.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp?rev=126465&r1=126464&r2=126465&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp Thu Feb 24 19:11:01 2011
@@ -270,6 +270,7 @@
return NULL;
if (BitWidth > LOI->KnownZero.getBitWidth()) {
+ LOI->NumSignBits = 1;
LOI->KnownZero = LOI->KnownZero.zextOrTrunc(BitWidth);
LOI->KnownOne = LOI->KnownOne.zextOrTrunc(BitWidth);
}
More information about the llvm-commits
mailing list