summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonas Paulsson <paulsson@linux.vnet.ibm.com>2018-02-27 07:53:23 +0000
committerJonas Paulsson <paulsson@linux.vnet.ibm.com>2018-02-27 07:53:23 +0000
commitf268cd0aadd218e163dd33d69391c363d35b59ce (patch)
treef1d1cd8a4dcdbe74963a7c5df4db74821c9e7418
parentdebfbcf86e35f4c142c38c5e1f3f64829d71b5ac (diff)
downloadbcm5719-llvm-f268cd0aadd218e163dd33d69391c363d35b59ce.tar.gz
bcm5719-llvm-f268cd0aadd218e163dd33d69391c363d35b59ce.zip
[SystemZ] Make sure SelectCode() is not called on a target opcode.
Since getNode() might not always return the requsted opcode, for instance if called with (ISD::AND, -1) arguments, there should be a check so that SelectCode() is only called when appropriate. Review: Ulrich Weigand llvm-svn: 326178
-rw-r--r--llvm/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp b/llvm/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp
index d1769757157..9bf2474915c 100644
--- a/llvm/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp
+++ b/llvm/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp
@@ -993,7 +993,8 @@ bool SystemZDAGToDAGISel::tryRISBGZero(SDNode *N) {
N = New.getNode();
}
// Now, select the machine opcode to implement this operation.
- SelectCode(N);
+ if (!N->isMachineOpcode())
+ SelectCode(N);
return true;
}
}
OpenPOWER on IntegriCloud