diff options
author | Nate Begeman <natebegeman@mac.com> | 2006-02-03 22:38:07 +0000 |
---|---|---|
committer | Nate Begeman <natebegeman@mac.com> | 2006-02-03 22:38:07 +0000 |
commit | 20a894282d9bfe0c29b1cdb22172b976748e7edb (patch) | |
tree | 5bf4fadf83834efde72724951c5fa233d0678252 /llvm/lib/Target/TargetLowering.cpp | |
parent | dc7bba9ffea1ee7e638c4757cf8a552bc3c1aae3 (diff) | |
download | bcm5719-llvm-20a894282d9bfe0c29b1cdb22172b976748e7edb.tar.gz bcm5719-llvm-20a894282d9bfe0c29b1cdb22172b976748e7edb.zip |
Implement some feedback from sabre
llvm-svn: 25946
Diffstat (limited to 'llvm/lib/Target/TargetLowering.cpp')
-rw-r--r-- | llvm/lib/Target/TargetLowering.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/Target/TargetLowering.cpp b/llvm/lib/Target/TargetLowering.cpp index 8951490fb6e..5a191d99981 100644 --- a/llvm/lib/Target/TargetLowering.cpp +++ b/llvm/lib/Target/TargetLowering.cpp @@ -135,14 +135,14 @@ const char *TargetLowering::getTargetNodeName(unsigned Opcode) const { /// set operation such as a sign extend or or/xor with constant whose only /// use is Op. If it returns true, the old node that sets bits which are /// not demanded is returned in Old, and its replacement node is returned in -/// New, such that callers of SetBitsAreZero may call CombineTo on them if +/// New, such that callers of DemandedBitsAreZero may call CombineTo on them if /// desired. bool TargetLowering::DemandedBitsAreZero(const SDOperand &Op, uint64_t Mask, SDOperand &Old, SDOperand &New, SelectionDAG &DAG) { // If the operation has more than one use, we're not interested in it. // Tracking down and checking all uses would be problematic and slow. - if (!Op.hasOneUse()) + if (!Op.Val->hasOneUse()) return false; switch (Op.getOpcode()) { @@ -164,11 +164,11 @@ bool TargetLowering::DemandedBitsAreZero(const SDOperand &Op, uint64_t Mask, MVT::ValueType EVT = cast<VTSDNode>(Op.getOperand(1))->getVT(); unsigned ExtendBits = MVT::getSizeInBits(EVT); // If we're extending from something smaller than MVT::i64 and all of the - // sign extension bits are masked, return true and set New to be a zero - // extend inreg from the same type. + // sign extension bits are masked, return true and set New to be the + // first operand, since we no longer care what the high bits are. if (ExtendBits < 64 && ((Mask & (~0ULL << ExtendBits)) == 0)) { Old = Op; - New = DAG.getZeroExtendInReg(Op.getOperand(0), EVT); + New = Op.getOperand(0); return true; } break; |