[llvm] r326178 - [SystemZ] Make sure SelectCode() is not called on a target opcode.
Jonas Paulsson via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 26 23:53:23 PST 2018
Author: jonpa
Date: Mon Feb 26 23:53:23 2018
New Revision: 326178
URL: http://llvm.org/viewvc/llvm-project?rev=326178&view=rev
Log:
[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
Modified:
llvm/trunk/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp
Modified: llvm/trunk/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp?rev=326178&r1=326177&r2=326178&view=diff
==============================================================================
--- llvm/trunk/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp (original)
+++ llvm/trunk/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp Mon Feb 26 23:53:23 2018
@@ -993,7 +993,8 @@ bool SystemZDAGToDAGISel::tryRISBGZero(S
N = New.getNode();
}
// Now, select the machine opcode to implement this operation.
- SelectCode(N);
+ if (!N->isMachineOpcode())
+ SelectCode(N);
return true;
}
}
More information about the llvm-commits
mailing list