summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-02-25 21:11:39 +0000
committerDan Gohman <gohman@apple.com>2008-02-25 21:11:39 +0000
commit1f372edd97c15455c113ffdcc786b52e95c41b5f (patch)
treeadb158ced8a68b13739b968006b25fdaa1120bd6 /llvm/lib/Target
parenteb85ab44f220432c309bc566c91ec4c0e5a607e4 (diff)
downloadbcm5719-llvm-1f372edd97c15455c113ffdcc786b52e95c41b5f.tar.gz
bcm5719-llvm-1f372edd97c15455c113ffdcc786b52e95c41b5f.zip
Convert MaskedValueIsZero and all its users to use APInt. Also add
a SignBitIsZero function to simplify a common use case. llvm-svn: 47561
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r--llvm/lib/Target/Alpha/AlphaISelDAGToDAG.cpp4
-rw-r--r--llvm/lib/Target/X86/X86ISelDAGToDAG.cpp2
2 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/Target/Alpha/AlphaISelDAGToDAG.cpp b/llvm/lib/Target/Alpha/AlphaISelDAGToDAG.cpp
index d1e1311ae93..b0ca39b945c 100644
--- a/llvm/lib/Target/Alpha/AlphaISelDAGToDAG.cpp
+++ b/llvm/lib/Target/Alpha/AlphaISelDAGToDAG.cpp
@@ -91,7 +91,9 @@ namespace {
// see if the missing bits (0x1000) are already known zero if not, the zap
// isn't okay to do, as it won't clear all the required bits.
if (BitsToCheck &&
- !CurDAG->MaskedValueIsZero(LHS, BitsToCheck))
+ !CurDAG->MaskedValueIsZero(LHS,
+ APInt(LHS.getValueSizeInBits(),
+ BitsToCheck)))
return 0;
return Result;
diff --git a/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp b/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
index b61e68e0cf9..c8b341406ca 100644
--- a/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
+++ b/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
@@ -819,7 +819,7 @@ bool X86DAGToDAGISel::MatchAddress(SDOperand N, X86ISelAddressMode &AM,
// On x86-64, the resultant disp must fit in 32-bits.
isInt32(AM.Disp + CN->getSignExtended()) &&
// Check to see if the LHS & C is zero.
- CurDAG->MaskedValueIsZero(N.getOperand(0), CN->getValue())) {
+ CurDAG->MaskedValueIsZero(N.getOperand(0), CN->getAPIntValue())) {
AM.Disp += CN->getValue();
return false;
}
OpenPOWER on IntegriCloud