Skip to content

Commit

Permalink
Fatal assert any creation of nodes with deprecated constant opcodes
Browse files Browse the repository at this point in the history
Signed-off-by: Bohao(Aaron) Wang <aaronwang0407@gmail.com>
  • Loading branch information
wbh123456 committed Oct 10, 2019
1 parent f6db6f3 commit 7d9723e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions compiler/il/OMRNode.hpp
Expand Up @@ -388,6 +388,12 @@ class OMR_EXTENSIBLE Node
case TR::ifbucmpne:
case TR::ifsucmpeq:
case TR::ifsucmpne:

//Constant
case TR::buconst:
case TR::iuconst:
case TR::luconst:
case TR::cconst:
return false;

default:
Expand Down
2 changes: 1 addition & 1 deletion compiler/optimizer/DebuggingCounters.cpp
Expand Up @@ -175,7 +175,7 @@ void TR_DebuggingCounters::insertCounter(const char * name, TR::Compilation * co
TR::Node* loadNode = TR::Node::createWithSymRef(node, TR::iuload, 0, counterRef);

TR::Node* addNode =
TR::Node::create(TR::iadd, 2, loadNode,
TR::Node::create(TR::iuadd, 2, loadNode,
TR::Node::create(node, TR::iconst, 0, 1));

TR::TreeTop* incrementTree =
Expand Down

0 comments on commit 7d9723e

Please sign in to comment.