TODO: instruction elimination and potentially boolean handling