Commit d87a9eef authored by Paul's avatar Paul
Browse files

Formatting

parent 4e960940
...@@ -42,7 +42,8 @@ void dead_code_elimination::apply(program& p) const ...@@ -42,7 +42,8 @@ void dead_code_elimination::apply(program& p) const
if(i == last) if(i == last)
break; break;
// Skip instruction with empty shape as output unless its a builtin or undefined // Skip instruction with empty shape as output unless its a builtin or undefined
if(i->get_shape().elements() == 0 and not(i->name().front() == '@') and not(i->name() == "undefined")) if(i->get_shape().elements() == 0 and not(i->name().front() == '@') and
not(i->name() == "undefined"))
continue; continue;
assert(bidistance(p, i, last) > 0); assert(bidistance(p, i, last) > 0);
fix([&](auto self, auto leaf) { fix([&](auto self, auto leaf) {
......
...@@ -116,8 +116,8 @@ TEST_CASE(undefined_test) ...@@ -116,8 +116,8 @@ TEST_CASE(undefined_test)
{ {
migraphx::program p; migraphx::program p;
auto one = p.add_literal(1); auto one = p.add_literal(1);
auto two = p.add_literal(2); auto two = p.add_literal(2);
auto undef = p.add_instruction(migraphx::op::undefined{}); auto undef = p.add_instruction(migraphx::op::undefined{});
p.add_instruction(sum_op{}, one, two); p.add_instruction(sum_op{}, one, two);
auto count = std::distance(p.begin(), p.end()); auto count = std::distance(p.begin(), p.end());
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment