aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-08-28 23:39:22 +0000
committerChris Lattner <sabre@nondot.org>2005-08-28 23:39:22 +0000
commit528f58e813ec4929a7997afbf121eb54e8bacf4c (patch)
tree596bea6ac33a3724916482320af9472bc19bc95d
parentdd22dc85eafd742a240dc19741cf7c3a3c4ad0fb (diff)
fix an assertion failure in treeadd
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23120 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/PowerPC/PPCISelDAGToDAG.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Target/PowerPC/PPCISelDAGToDAG.cpp b/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
index 4c06e3d97b..c67358e8cf 100644
--- a/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
+++ b/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
@@ -996,7 +996,7 @@ SDOperand PPC32DAGToDAGISel::Select(SDOperand Op) {
if (isOprNot(N)) {
unsigned Opc;
SDOperand Val = Select(N->getOperand(0));
- switch (Val.getTargetOpcode()) {
+ switch (Val.isTargetOpcode() ? Val.getTargetOpcode() : 0) {
default: Opc = 0; break;
case PPC::OR: Opc = PPC::NOR; break;
case PPC::AND: Opc = PPC::NAND; break;
@@ -1094,7 +1094,7 @@ SDOperand PPC32DAGToDAGISel::Select(SDOperand Op) {
MVT::ValueType Ty = N->getValueType(0);
if (Val.Val->hasOneUse()) {
unsigned Opc;
- switch (Val.getTargetOpcode()) {
+ switch (Val.isTargetOpcode() ? Val.getTargetOpcode() : 0) {
default: Opc = 0; break;
case PPC::FABS: Opc = PPC::FNABS; break;
case PPC::FMADD: Opc = PPC::FNMADD; break;