aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-12-06 07:44:31 +0000
committerChris Lattner <sabre@nondot.org>2007-12-06 07:44:31 +0000
commite00cbad78de86ac8e736f35db35632c83ef64c1d (patch)
tree9c632b56f0ac8e00782f54c52276b569cb9b423a /lib/CodeGen/SelectionDAG/DAGCombiner.cpp
parente70da20f9a7edb15e1d9bd221839e2ff26e40955 (diff)
Actually, disable this code for now. More analysis and improvements to
the X86 backend are needed before this should be enabled by default. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44657 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/DAGCombiner.cpp')
-rw-r--r--lib/CodeGen/SelectionDAG/DAGCombiner.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index 918db38353..ba3c0ac33d 100644
--- a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -2134,6 +2134,12 @@ SDOperand DAGCombiner::visitXOR(SDNode *N) {
/// visitShiftByConstant - Handle transforms common to the three shifts, when
/// the shift amount is a constant.
SDOperand DAGCombiner::visitShiftByConstant(SDNode *N, unsigned Amt) {
+ // FIXME: disable this for now. This pessimizes some common cases like:
+ //
+ //void foo(int *X, int i) { X[i & 1235] = 1; }
+ //int bar(int *X, int i) { return X[i & 255]; }
+ return SDOperand();
+
SDNode *LHS = N->getOperand(0).Val;
if (!LHS->hasOneUse()) return SDOperand();