[llvm-commits] [llvm] r110019 - /llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp
Eli Friedman
eli.friedman at gmail.com
Sun Aug 1 21:42:25 PDT 2010
Author: efriedma
Date: Sun Aug 1 23:42:25 2010
New Revision: 110019
URL: http://llvm.org/viewvc/llvm-project?rev=110019&view=rev
Log:
PR7586: Make sure we don't claim that unknown bits are actually known in the
ISD::AND case of TargetLowering::SimplifyDemandedBits.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp?rev=110019&r1=110018&r2=110019&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp Sun Aug 1 23:42:25 2010
@@ -1497,11 +1497,10 @@
// present in the input.
APInt NewBits =
APInt::getHighBitsSet(BitWidth,
- BitWidth - EVT.getScalarType().getSizeInBits()) &
- NewMask;
+ BitWidth - EVT.getScalarType().getSizeInBits());
// If none of the extended bits are demanded, eliminate the sextinreg.
- if (NewBits == 0)
+ if ((NewBits & NewMask) == 0)
return TLO.CombineTo(Op, Op.getOperand(0));
APInt InSignBit = APInt::getSignBit(EVT.getScalarType().getSizeInBits());
More information about the llvm-commits
mailing list