[CODEGEN] Bugfix in Disassociate pass; Added fp32 atomic_add support

This commit is contained in:
Philippe Tillet
2020-05-13 23:21:21 -04:00
committed by Philippe Tillet
parent bb2d98ce4b
commit e7461a862b
4 changed files with 32 additions and 4 deletions

View File

@@ -277,6 +277,13 @@ void Generator::VisitFuncCall(FuncCall* funcCall) {
ir::value* val = ret_;
return set_ret(bld_->create_atomic_exch(ptr, val));
}
if(name == "f32_atomic_add"){
VisitExpr(funcCall->Args()->at(0));
ir::value* ptr = ret_;
VisitExpr(funcCall->Args()->at(1));
ir::value* val = ret_;
return set_ret(bld_->create_atomic_add(ptr, val));
}
if(name == "sqrtf"){
VisitExpr(funcCall->Args()->at(0));
ir::value* ret = ret_;