[CODEGEN] Fixed atomic_add issue (#112)

* [CODEGEN] Fixed atomic_add issue

* [CODEGEN] Fixed liveness analysis bug for instructions that are not
DCE'd but have no users (e.g., atomic_cas)
This commit is contained in:
Philippe Tillet
2021-05-19 21:40:41 -04:00
committed by Philippe Tillet
parent 325ee38581
commit f81012a8cf
6 changed files with 77 additions and 34 deletions

View File

@@ -45,6 +45,8 @@ void liveness::run(ir::module &mod) {
for(ir::user *u: users)
if(indices.find(u) != indices.end())
end = std::max(end, indices.at(u));
if(end == 0)
end = start + 1;
intervals_[layout] = segment{start, end};
}