Commit 58681660 authored by Paul's avatar Paul
Browse files

Remove builtins with dce

parent 6b80ea7a
......@@ -16,8 +16,8 @@ void dead_code_elimination::apply(program& p) const
if(ins == p.begin())
continue;
const auto i = std::prev(ins);
// Skip instruction with empty shape as output
if(i->result.elements() == 0)
// Skip instruction with empty shape as output unless its a builtin
if(i->result.elements() == 0 and not(i->op.name().front() == '@'))
continue;
// Skip the last instruction
if(i == last)
......
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