aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/SelectionDAG/TargetLowering.cpp
diff options
context:
space:
mode:
authorDale Johannesen <dalej@apple.com>2008-11-12 02:00:35 +0000
committerDale Johannesen <dalej@apple.com>2008-11-12 02:00:35 +0000
commit01954eb1dc5d1b4e2c100691f9513d838a87659b (patch)
tree3b3312466c3953d45f7950b5e7f19641b70590f2 /lib/CodeGen/SelectionDAG/TargetLowering.cpp
parent668d0df68e2c40e4f4073535afcc5ec210d7d200 (diff)
downloadexternal_llvm-01954eb1dc5d1b4e2c100691f9513d838a87659b.zip
external_llvm-01954eb1dc5d1b4e2c100691f9513d838a87659b.tar.gz
external_llvm-01954eb1dc5d1b4e2c100691f9513d838a87659b.tar.bz2
Fix the testb optimization so x86 also bootstraps.
Reenable test. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59101 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/TargetLowering.cpp')
-rw-r--r--lib/CodeGen/SelectionDAG/TargetLowering.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/CodeGen/SelectionDAG/TargetLowering.cpp b/lib/CodeGen/SelectionDAG/TargetLowering.cpp
index e125ff3..62a6df3 100644
--- a/lib/CodeGen/SelectionDAG/TargetLowering.cpp
+++ b/lib/CodeGen/SelectionDAG/TargetLowering.cpp
@@ -1353,7 +1353,6 @@ TargetLowering::SimplifySetCC(MVT VT, SDValue N0, SDValue N1,
}
}
-#if 0
// If the LHS is '(and load, const)', the RHS is 0,
// the test is for equality or unsigned, and all 1 bits of the const are
// in the same partial word, see if we can shorten the load.
@@ -1380,7 +1379,7 @@ TargetLowering::SimplifySetCC(MVT VT, SDValue N0, SDValue N1,
bestOffset = (origWidth/width - offset - 1) * (width/8);
else
bestOffset = (uint64_t)offset * (width/8);
- bestMask = Mask >> (offset * 8);
+ bestMask = Mask >> (offset * (width/8) * 8);
bestWidth = width;
break;
}
@@ -1407,7 +1406,6 @@ TargetLowering::SimplifySetCC(MVT VT, SDValue N0, SDValue N1,
}
}
}
-#endif
// If the LHS is a ZERO_EXTEND, perform the comparison on the input.
if (N0.getOpcode() == ISD::ZERO_EXTEND) {