[LANG] Added sqrtf support
This commit is contained in:
@@ -204,6 +204,7 @@ void Generator::VisitUnaryOp(UnaryOp* unary) {
|
||||
case Token::CAST: return set_ret(GenSemCastOp(arg, GenIRType(unary->Type(), *ctx_)));
|
||||
case Token::EXP: return set_ret(bld_->create_exp(arg)); //FIXME cast
|
||||
case Token::LOG: return set_ret(bld_->create_log(arg));
|
||||
case Token::SQRTF: return set_ret(bld_->create_sqrt(arg));
|
||||
case Token::REDUCE: {
|
||||
int ax, tag;
|
||||
UnaryOp::decodeRed(unary->info_, ax, tag);
|
||||
@@ -287,11 +288,6 @@ void Generator::VisitFuncCall(FuncCall* funcCall) {
|
||||
ir::value* msk = ret_;
|
||||
return set_ret(bld_->create_atomic_add(ptr, val, msk));
|
||||
}
|
||||
if(name == "sqrtf"){
|
||||
VisitExpr(funcCall->Args()->at(0));
|
||||
ir::value* ret = ret_;
|
||||
return set_ret(bld_->create_sqrt(ret));
|
||||
}
|
||||
if(name == "calloc"){
|
||||
VisitExpr(funcCall->Args()->at(0));
|
||||
ir::value* ret = ret_;
|
||||
|
Reference in New Issue
Block a user