mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-25 05:22:04 +00:00
More dead code removal (using -Wunreachable-code)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148578 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -2245,8 +2245,7 @@ unsigned SelectionDAG::ComputeNumSignBits(SDValue Op, unsigned Depth) const{
|
||||
|
||||
Tmp2 = ComputeNumSignBits(Op.getOperand(1), Depth+1);
|
||||
if (Tmp2 == 1) return 1;
|
||||
return std::min(Tmp, Tmp2)-1;
|
||||
break;
|
||||
return std::min(Tmp, Tmp2)-1;
|
||||
|
||||
case ISD::SUB:
|
||||
Tmp2 = ComputeNumSignBits(Op.getOperand(1), Depth+1);
|
||||
@@ -2275,8 +2274,7 @@ unsigned SelectionDAG::ComputeNumSignBits(SDValue Op, unsigned Depth) const{
|
||||
// is, at worst, one more bit than the inputs.
|
||||
Tmp = ComputeNumSignBits(Op.getOperand(0), Depth+1);
|
||||
if (Tmp == 1) return 1; // Early out.
|
||||
return std::min(Tmp, Tmp2)-1;
|
||||
break;
|
||||
return std::min(Tmp, Tmp2)-1;
|
||||
case ISD::TRUNCATE:
|
||||
// FIXME: it's tricky to do anything useful for this, but it is an important
|
||||
// case for targets like X86.
|
||||
@@ -3160,16 +3158,14 @@ SDValue SelectionDAG::getNode(unsigned Opcode, DebugLoc DL, EVT VT,
|
||||
case ISD::SELECT:
|
||||
if (N1C) {
|
||||
if (N1C->getZExtValue())
|
||||
return N2; // select true, X, Y -> X
|
||||
else
|
||||
return N3; // select false, X, Y -> Y
|
||||
return N2; // select true, X, Y -> X
|
||||
return N3; // select false, X, Y -> Y
|
||||
}
|
||||
|
||||
if (N2 == N3) return N2; // select C, X, X -> X
|
||||
break;
|
||||
case ISD::VECTOR_SHUFFLE:
|
||||
llvm_unreachable("should use getVectorShuffle constructor!");
|
||||
break;
|
||||
case ISD::INSERT_SUBVECTOR: {
|
||||
SDValue Index = N3;
|
||||
if (VT.isSimple() && N1.getValueType().isSimple()
|
||||
|
||||
Reference in New Issue
Block a user