summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-01-14 03:08:49 +0000
committerDan Gohman <gohman@apple.com>2010-01-14 03:08:49 +0000
commitdd5286dc63fe3e2e85d03066147e94d7f12d1f0a (patch)
treea485983caddcffbcefa6a1b3d60bc9014076b869 /llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
parent0a7d9305f108c41daf2eb407eee56528a33cff8d (diff)
downloadbcm5719-llvm-dd5286dc63fe3e2e85d03066147e94d7f12d1f0a.tar.gz
bcm5719-llvm-dd5286dc63fe3e2e85d03066147e94d7f12d1f0a.zip
Fix a codegen abort seen in 483.xalancbmk.
llvm-svn: 93417
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index 69a7a9789a4..549527c1a3f 100644
--- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -1684,6 +1684,9 @@ SDValue DAGCombiner::SimplifyBinOpWithSameOpcodeHands(SDNode *N) {
EVT VT = N0.getValueType();
assert(N0.getOpcode() == N1.getOpcode() && "Bad input!");
+ // Bail early if none of these transforms apply.
+ if (N0.getNode()->getNumOperands() == 0) return SDValue();
+
// For each of OP in AND/OR/XOR:
// fold (OP (zext x), (zext y)) -> (zext (OP x, y))
// fold (OP (sext x), (sext y)) -> (sext (OP x, y))
OpenPOWER on IntegriCloud